-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
44 lines (41 loc) · 1.34 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
from setuptools import Extension, setup
import os
import sys
import re
PKG = "pylebedev"
VERSIONFILE = os.path.join(os.path.dirname(__file__), PKG, "_version.py")
verstr = "unknown"
try:
verstrline = open(VERSIONFILE, "rt").read()
except EnvironmentError:
pass # Okay, there is no version file.
else:
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo:
verstr = mo.group(1)
else:
print(r"Unable to find version in %s" % (VERSIONFILE,))
raise RuntimeError(r"If %s.py exists, it is required to be well-formed" % (VERSIONFILE,))
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(
name=PKG,
version=verstr,
author="Ivo Filot",
author_email="ivo@ivofilot.nl",
description="Python package for obtaining Lebedev quadrature points and coefficients",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/ifilot/pylebedev",
packages=[PKG],
include_package_data=True,
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX",
],
python_requires='>=3.6',
zip_safe=False,
install_requires=['numpy'],
)