-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
68 lines (59 loc) · 1.97 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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# File : setup.py
# License: GNU v3.0
# Author : Dominik Werner
# Date : 08.09.2020
import sys
from setuptools.command.install import install
from setuptools import setup, find_packages
import numpy as np
import os
debug = os.getenv("UPPP_DEBUG")
if debug == "true":
features = ["uPPPP_debug", "python"]
else:
features = ["python"]
try:
from setuptools_rust import RustExtension, Binding
except ImportError:
import subprocess
errno = subprocess.call([sys.executable, "-m", "pip", "install", "setuptools-rust"])
if errno:
print("Please install setuptools-rust package")
raise SystemExit(errno)
else:
from setuptools_rust import RustExtension, Binding
setup_requires = ["setuptools-rust>=0.10.1", "wheel"]
install_requires = []
with open("README.md", "r") as f:
long_description = f.read()
setup(
name="up4",
version="0.1.0",
author="Dominik Werner <[email protected]>",
classifiers=[
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Rust",
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Physics",
],
url="https://github.com/D-werner-bham/pyAnalyse",
description="analysing toolset for particle data",
long_description=long_description,
long_description_content_type="text/markdown",
packages=find_packages(exclude=["tests", "*.tests", "*.tests.*", "tests.*"]),
package_data={"up4": ["py.typed"]},
rust_extensions=[
RustExtension("upppp_rust", features=features, binding=Binding.PyO3)
],
install_requires=install_requires,
setup_requires=setup_requires,
include_package_data=True,
zip_safe=False,
)