forked from scieloorg/packtools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
76 lines (61 loc) · 2.21 KB
/
setup.py
File metadata and controls
76 lines (61 loc) · 2.21 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/usr/bin/env python
#coding:utf-8
from __future__ import unicode_literals
from setuptools import setup, find_packages
import setuptools
import codecs
import sys
if sys.version_info[0:2] < (2, 7):
raise RuntimeError('Requires Python 2.7 or newer')
# adds version to the local namespace
VERSION = {}
with open('packtools/version.py') as fp:
exec(fp.read(), VERSION)
INSTALL_REQUIRES = [
'lxml>=3.4.0',
'picles.plumber>=0.11',
]
EXTRAS_REQUIRE = {}
TESTS_REQUIRE = []
# from https://hynek.me/articles/conditional-python-dependencies/
# basically, binary wheels built using setuptools version < 18 do not support
# the syntax for conditional dependencies used below.
if int(setuptools.__version__.split('.', 1)[0]) < 18:
assert "bdist_wheel" not in sys.argv, "setuptools 18 required for wheels."
if sys.version_info[0:2] < (3, 4):
INSTALL_REQUIRES.append('pathlib>=1.0.1')
else:
EXTRAS_REQUIRE[':python_version<"3.4"'] = ['pathlib>=1.0.1']
setup(
name="packtools",
version=VERSION['__version__'],
description="Handle SPS packages like a breeze.",
long_description=codecs.open('README.rst', mode='r', encoding='utf-8').read() + '\n\n' +
codecs.open('HISTORY.rst', mode='r', encoding='utf-8').read(),
author="SciELO",
maintainer="Gustavo Fonseca",
license="BSD License",
url="http://docs.scielo.org",
packages=find_packages(),
include_package_data=True,
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Topic :: Software Development :: Libraries :: Python Modules",
],
tests_require=TESTS_REQUIRE,
test_suite='tests',
install_requires=INSTALL_REQUIRES,
extras_require=EXTRAS_REQUIRE,
entry_points="""
[console_scripts]
stylechecker = packtools.stylechecker:main
htmlgenerator = packtools.htmlgenerator:main
""")