-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.py
58 lines (47 loc) · 1.78 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
# -*- coding: utf-8 -*-
"Library providing means of conversion between oldhepdata format to new one, and new one to csv / yoda / root etc."
import os
from setuptools import setup
import re
def get_all_datafiles(package, path):
r = []
setup_path = os.path.dirname(__file__)
for abs_path, dirs, files in os.walk(os.path.join(setup_path, package, path)):
r += [os.path.join(path, f) for f in files]
return r
def get_version():
with open('hepdata_converter/version.py', 'r') as version_f:
content = version_f.read()
r = re.search('^__version__ *= *\'(?P<version>.+)\'', content, flags=re.MULTILINE)
if not r:
return '0.0.0'
return r.group('version')
# Get the long description from the README file
with open('README.rst', 'rt') as fp:
long_description = fp.read()
setup(
name='hepdata-converter',
version=get_version(),
install_requires=['hepdata-validator>=0.3.5'],
entry_points={
'console_scripts': [
'hepdata-converter = hepdata_converter:main',
]
},
extras_require={
'docs': ['Sphinx>=1.4.2', 'mock'],
'tests': ['coverage>=5.1'],
},
packages=['hepdata_converter', 'hepdata_converter.parsers', 'hepdata_converter.writers', 'hepdata_converter.testsuite'],
package_data={'hepdata_converter': get_all_datafiles(package='hepdata_converter/testsuite', path='testdata')},
include_package_data=True,
url='https://github.com/HEPData/hepdata-converter',
license='GPL',
author='HEPData Team',
author_email='[email protected]',
description=__doc__,
download_url='https://github.com/HEPData/hepdata-converter/tarball/%s' % get_version(),
long_description=long_description,
long_description_content_type='text/x-rst',
python_requires='>=3.6'
)