-
Notifications
You must be signed in to change notification settings - Fork 123
/
setup.py
131 lines (116 loc) · 4.07 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
import re
import os
import sys
from setuptools import setup
def abspath(relpath, _dir=os.path.dirname(__file__)):
return os.path.join(_dir, relpath)
def find_version(filename):
abs_filename = abspath(filename)
_version_re = re.compile(r"__version__ = ['\"](.*)['\"]")
last = None # match python semantics
for line in open(abs_filename):
version_match = _version_re.match(line)
if version_match:
last = version_match.group(1)
return last
__version__ = find_version('pyontutils/__init__.py')
def tangle_files(*files):
""" emacs org babel tangle blocks to files for release """
abs_files = [abspath(f) for f in files]
argv = [
'emacs',
'--batch',
'--quick',
'--directory', '.',
'--load', 'org',
'--load', 'ob-shell',
'--load', 'ob-python',
] + [arg
for f in abs_files
for arg in ['--eval', f'"(org-babel-tangle-file \\"{f}\\")"']]
os.system(' '.join(argv))
with open('README.md', 'rt') as f:
long_description = f.read()
RELEASE = '--release' in sys.argv
if RELEASE:
sys.argv.remove('--release')
tangle_files(
'./docs/release.org',)
tests_require = ['pytest']
setup(
name='pyontutils',
version=__version__,
description='utilities for working with the NIF ontology, SciGraph, and turtle',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/tgbugs/pyontutils',
author='Tom Gillespie',
author_email='[email protected]',
license='MIT',
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Operating System :: POSIX :: Linux',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
],
keywords='ontology scigraph rdflib turtle ttl OWL',
packages=['pyontutils'],
python_requires='>=3.6',
tests_require=tests_require,
install_requires=[
'augpathlib>=0.0.23',
'clifn',
'colorlog',
'docopt',
"funowl; python_version >= '3.8'",
'gitpython',
'google-api-python-client',
'google-auth-oauthlib',
'htmlfn',
'idlib>=0.0.1.dev14',
"ipython; python_version < '3.7'",
'joblib>=1.1.0',
'lxml',
'nest_asyncio',
'ontquery>=0.2.11',
'orthauth[sxpr]>=0.0.16',
'pyld',
'pyyaml',
'requests',
'terminaltables',
'ttlser>=1.1.4',
],
extras_require={'dev': ['pytest-cov', 'wheel'],
'spell': ['hunspell'],
'test': tests_require,
},
entry_points={
'console_scripts': [
'googapis=pyontutils.googapis:main',
'graphml-to-ttl=pyontutils.graphml_to_ttl:main',
'necromancy=pyontutils.necromancy:main',
'obo-io=pyontutils.obo_io:main',
'ont-catalog=pyontutils.make_catalog:main',
'ontload=pyontutils.ontload:main',
'ontutils=pyontutils.ontutils:main',
'overlaps=pyontutils.overlaps:main',
'qnamefix=pyontutils.qnamefix:main',
'scigraph-codegen=pyontutils.scigraph_codegen:main',
'scigraph-deploy=pyontutils.scigraph_deploy:main',
'scig=pyontutils.scig:main',
],
},
#package_data
#data_files=[('resources',['pyontutils/resources/chebi-subset-ids.txt',])], # not part of distro
#data_files=[('share/idlib/local-conventions/nifstd/', ['nifstd/scigraph/curie_map.yaml']),],
data_files=[('share/pyontutils/', ['nifstd/scigraph/curie_map.yaml']),],
)