-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
75 lines (67 loc) · 1.79 KB
/
setup.py
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
# yapf
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import os
import micropy
import tempfile
import subprocess
install = (
"funcy>=1.10.2",
"pysistence>=0.4.1",
"patterns>=0.3",
"jsonpickle>=1.2",
) # yapf: disable
develop = (
"pytest>=5.0.1",
"hypothesis>=4.24.3",
"altered_states>=1.0.9",
"pycodestyle>=2.5.0",
"mypy>=0.730",
"pyflakes>=2.1.1",
) # yapf: disable
try:
# make setup.py review available only to fully dev-capable
# interpreter instances
import mypy
from micropy.testing import ReviewProject
cmdclass = {'review': ReviewProject}
except ImportError:
cmdclass = {}
# Try to convert README to RST using pandoc (allowed to fail).
long_desc = ''
try:
tmpdir = tempfile.mkdtemp()
outpath = os.path.join(tmpdir, 'micropy-README.rst')
subprocess.check_call(['pandoc', 'README.org', '-o', outpath])
with open(outpath) as fp:
long_desc = fp.read()
except Exception as exc:
long_desc = '' # nothing to do.
setup(
name='micropy',
cmdclass=cmdclass,
version=micropy.__version__,
description="Some Python nicieties",
long_description=long_desc,
packages=('micropy', ),
author='Jacob Oscarson',
author_email='jacob@414soft.com',
install_requires=install,
extras_require={
'test': install + develop,
},
url='https://www.414soft.com/micropy',
license='MIT',
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
],
)