-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
50 lines (41 loc) · 1.4 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
import setuptools
import json
# Information:
#
# Official tutorial: https://packaging.python.org/tutorials/packaging-projects/
# List of PyPI classifiers: https://pypi.org/classifiers/
#
# If you put your Python module(s) in folder src/, set:
# packages=setuptools.find_packages('src'),
# package_dir={'': 'src'}
#
# load contents from various config files
with open('package.json') as fh:
data = json.load(fh)
with open("README.md", "r") as fh:
long_description = fh.read()
with open("version.txt") as fh:
version = fh.read().strip()
# check data fields
required = {'name','author','author_email','description','homepage'}
assert required <= data.keys(), ValueError('Missing required field(s).')
# remap field names if needed
data['url'] = data.pop('homepage')
# ------------------------------------------------------------------------
setuptools.setup(
**data,
version=version,
long_description=long_description,
long_description_content_type="text/markdown",
packages=setuptools.find_packages('src'),
package_dir={'': 'src'},
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Topic :: Text Processing",
"License :: OSI Approved :: European Union Public Licence 1.2 (EUPL 1.2)",
"Operating System :: OS Independent"
],
python_requires='>=3.6',
)