-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
59 lines (51 loc) · 2.06 KB
/
Copy pathsetup.py
File metadata and controls
59 lines (51 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/env python
import os
import re
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
base_dir = os.path.dirname(os.path.abspath(__file__))
def get_version(filename="pelican_comment_system/__init__.py"):
with open(os.path.join(base_dir, filename), encoding="utf-8") as initfile:
for line in initfile.readlines():
m = re.match("__version__ *= *['\"](.*)['\"]", line)
if m:
return m.group(1)
def get_long_description(absolute_url):
readme = open(os.path.join(base_dir, "README.rst")).read()
# Fix relative links
readme = readme.replace("<doc/", "<" + absolute_url + "/doc/")
readme = readme.replace("<./", "<" + absolute_url + "/")
# TODO: remove change log section from readme
return "\n\n".join([readme, open(os.path.join(base_dir, "CHANGELOG.rst")).read()])
base_url = "https://github.com/Scheirle/pelican_comment_system"
setup(
name="pelican_comment_system",
version=get_version(),
description="Allows you to add static comments to your articles on your Pelican blog.",
long_description=get_long_description(base_url + "/tree/v" + get_version()),
author="Bernhard Scheirle",
author_email="bernhard+python@scheirle.de",
url=base_url,
packages=['pelican_comment_system',
'pelican_comment_system.identicon'],
include_package_data=True,
install_requires=[
'pelican>=3.4',
'pillow',
],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
# 'Programming Language :: Python :: 3.4',
# 'Programming Language :: Python :: 3.5',
# 'Programming Language :: Python :: 3.6',
'Topic :: Software Development :: Libraries :: Python Modules',
],
)