-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
executable file
·52 lines (46 loc) · 1.46 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
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
def get_metadata(relpath, varname):
"""Read metadata info from a file without importing it."""
from os.path import dirname, join
if "__file__" not in globals():
root = "."
else:
root = dirname(__file__)
for line in open(join(root, relpath), "rb"):
line = line.decode("cp437")
if varname in line:
if '"' in line:
return line.split('"')[1]
elif "'" in line:
return line.split("'")[1]
setup(
name="XeprAPI",
version=get_metadata("XeprAPI/__init__.py", "__version__"),
description="Python interface for for Bruker Xepr.",
author=get_metadata("XeprAPI/__init__.py", "__author__"),
author_email="ss2151@cam.ac.uk",
license="MIT",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
packages=find_packages(),
package_data={
"XeprAPI": [
"*.so",
"*.py",
],
},
install_requires=[
"numpy>=1.2.1",
],
python_requires='>=3.6',
zip_safe=False,
classifiers=[
'License :: OSI Approved :: MIT License',
'Operating System :: Unix',
'Programming Language :: Python',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
],
)