-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
62 lines (54 loc) · 1.88 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import ast
import os
import setuptools
REQUIREMENTS: dict = {
"core": [
"cmmnbuild-dep-manager~=2.9",
"jpype1>=1.2.1,<2.*",
"numpy",
],
"test": ["pytest", ],
}
def get_version_from_init():
init_file = os.path.join(os.path.dirname(__file__), "pjlsa", "__init__.py")
with open(init_file, "r") as fd:
for line in fd:
if line.startswith("__version__"):
return ast.literal_eval(line.split("=", 1)[1].strip())
ALL_PYI = [('*/' * depth) + '*.pyi' for depth in range(0, 10)]
VERSION = get_version_from_init()
setuptools.setup(
name="pjlsa",
version=VERSION,
description="A Python wrapping of Java LSA API",
author="LSA / InCA team",
author_email="inca-support@cern.ch",
url="https://gitlab.cern.ch/scripting-tools/pjlsa",
packages=["pjlsa", "cern-stubs", "com-stubs", "java-stubs"],
package_dir={"pjlsa": "pjlsa", "cern-stubs": "cern-stubs", "com-stubs": "com-stubs", "java-stubs": "java-stubs"},
python_requires='~=3.7',
classifiers=[
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
],
install_requires=REQUIREMENTS["core"],
extras_require={
**REQUIREMENTS,
# The 'dev' extra is the union of 'test' and 'doc', with an option
# to have explicit development dependencies listed.
"dev": [
req
for extra in ["dev", "test", "doc"]
for req in REQUIREMENTS.get(extra, [])
],
# The 'all' extra is the union of all requirements.
"all": [req for reqs in REQUIREMENTS.values() for req in reqs],
},
entry_points={
# Register with cmmnbuild_dep_manager.
"cmmnbuild_dep_manager": [f"pjlsa={VERSION}"],
},
package_data={'cern-stubs': ALL_PYI, 'java-stubs': ALL_PYI, 'com-stubs': ALL_PYI},
)