-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
83 lines (75 loc) · 2.53 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
76
77
78
79
80
81
82
83
#!/usr/bin/env python
import os
import sys
from setuptools import setup
import json
import urllib.request
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
# Obtain the newest version of the licenses definition and replace the one
# provided by the package.
url = 'https://licenses.opendefinition.org/licenses/groups/all.json'
try:
with urllib.request.urlopen(url) as f:
licenses = json.load(f)
_zenodo_path = os.path.join('datalight', 'schemas', 'zenodo')
with open(os.path.join(_zenodo_path, 'opendefinition-licenses.json'), 'w') as f:
json.dump(licenses, f)
except urllib.error.URLError:
print('Licenses file last version not available. '
'Use the one provided by the package')
requirements = [
'requests',
'docopt',
'pyaml',
'jsonschema',
]
test_requirements = [
'pytest',
'testfixtures',
]
setup(name='datalight',
packages=['datalight'],
version='0.6.0',
description=('Data uploader to Zenodo repository'),
long_description=readme,
author='Nicolas Gruel',
author_email='nicolas.gruel@mgmail.com',
url='https://github.com/gruel/datalight',
classifiers=[
'Development Status :: 1 - RC',
'Intended Audience :: Science/Research',
'Topic :: Topic :: Scientific/Engineering :: Physics',
'Environment :: Console',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Operating System :: Unix',
'Operating System :: Microsoft',
'Operating System :: MacOS'
],
keywords=[],
install_requires=requirements,
setup_requires=['pytest-runner'],
test_suite='test',
tests_require=test_requirements,
extra_requires={
'dev': ['pylint', 'pytest', 'pytest-cov', 'testfixtures', 'coverage'],
'test': ['pytest', 'pytest-cov', 'testfixtures', 'coverage'],
'doc': ['sphinx', 'numpydoc']},
entry_points={
'console_scripts': [
' datalight = datalight.datalight:main']
},
package_data={
'': ['LICENSE'],
'datalight': ['schemas/zenodo/metadata-1.0.0.yml',
'schemas/zenodo/opendefinition-licenses.json'],
},
include_package_data=True,
license='MIT',
plateforms='any'
)