forked from CLARIAH/grlc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
59 lines (52 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
#!/usr/bin/env python
# -*- coding: iso-8859-15 -*-
import codecs
import os
from setuptools import setup
grlc_base = 'src'
grlc_base_dir = os.path.join(grlc_base, '')
grlc_data = []
for root,dirs,files in os.walk(grlc_base):
if root != grlc_base:
root_dir = root.replace(grlc_base_dir, '')
data_files = os.path.join(root_dir, '*')
grlc_data.append(data_files)
# To update the package version number, edit CITATION.cff
with open('CITATION.cff', 'r') as cff:
for line in cff:
if 'version:' in line:
version = line.replace('version:', '').strip().strip('"')
with codecs.open('requirements.txt', mode='r') as f:
install_requires = f.read().splitlines()
with codecs.open('requirements-test.txt', mode='r') as f:
tests_require = f.read().splitlines()
with codecs.open('README.md', mode='r', encoding='utf-8') as f:
long_description = f.read()
setup(
name="grlc",
description='grlc, the git repository linked data API constructor',
long_description=long_description,
long_description_content_type='text/markdown',
license="Copyright 2017 Albert Meroño",
author='Albert Meroño',
author_email='albert.merono@vu.nl',
url='https://github.com/CLARIAH/grlc',
version=version,
py_modules=['grlc'],
packages=['grlc'],
package_dir = {'grlc': grlc_base},
scripts=['bin/grlc-server'],
install_requires=install_requires,
setup_requires=[
# dependency for `python setup.py test`
'pytest-runner',
# dependencies for `python setup.py build_sphinx`
'sphinx',
'recommonmark'
],
tests_require=tests_require,
package_data = { 'grlc': grlc_data },
include_package_data=True,
data_files=[('citation/grlc', ['CITATION.cff'])],
python_requires='>=3.7, <=3.8',
)