-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
executable file
·90 lines (81 loc) · 2.81 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
#!/usr/bin/env python3
"""Setup script for intalling the geoAssembler."""
import glob
import os.path as osp
import re
from setuptools import setup, find_packages
import sys
def get_script_path():
"""Return the directory path of this file."""
return osp.dirname(osp.realpath(sys.argv[0]))
def read(*parts):
"""Read the content of a file."""
return open(osp.join(get_script_path(), *parts)).read()
def find_version(*parts):
"""Get the version number of the lib."""
vers_file = read(*parts)
match = re.search(r'^__version__ = "(\d+\.\d+\.\d+)"', vers_file, re.M)
if match is not None:
return match.group(1)
raise RuntimeError("Unable to find version string.")
def find_files(directory):
return glob.glob(osp.join(directory, '*'))
setup(name="geoAssembler",
version=find_version("geoAssembler", "__init__.py"),
author="European XFEL GmbH",
author_email="[email protected]",
maintainer="Martin Bergemann",
url="https://git.xfel.eu/gitlab/dataAnalysis/geoAssembler",
description="Tool to Calibrate Detector Geometry Based on Power Diffraction Pattern",
long_description=read("README.md"),
long_description_content_type='text/markdown',
license="BSD-3-Clause",
packages=find_packages(),
data_files=[('templates', find_files('templates')),
('cells', find_files('cells'))],
package_data={'': ['cells/*.D', 'templates/*.tmpl', 'icons/*.png'],
'geoAssembler.tests': ['data_*.npz', 'test.geom'],
'geoAssembler.qt.editor': ['*.ui'],
},
entry_points={
'gui_scripts': [
'geoAssembler = geoAssembler.main:main'
]},
install_requires=[
'cfelpyutils',
'EXtra-data',
'EXtra-geom >=1.1.0',
'matplotlib',
'numpy',
'pyqtgraph',
'ipywidgets',
'pyFai',
'PyQt5 >= 5.13.2, <= 6.0.0',
'PyQt5-sip >= 12.7.0, <= 13.0.0',
'scipy',
'xarray >= 0.14.1',
],
extras_require={
'docs': [
'sphinx',
'nbsphinx',
'ipython', # For nbsphinx syntax highlighting
],
'test': [
'pytest',
'testpath',
]
},
python_requires='>=3.4',
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3',
'Topic :: Scientific/Engineering :: Information Analysis',
'Topic :: Scientific/Engineering :: Physics',
]
)