-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
63 lines (49 loc) · 1.64 KB
/
setup.py
File metadata and controls
63 lines (49 loc) · 1.64 KB
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
import os
from setuptools import setup, Extension
import sys
BASE_DIR = os.path.dirname(__file__)
# Don't run any setup tasks if we're running on readthedocs.org.
if os.environ.get('READTHEDOCS', None) == 'True':
sys.exit()
EXTENSION_OPTIONS = {
'language': 'c++',
'libraries': ['ringing', 'ringingcore'],
}
# Detect whether Cython is installed.
try:
from Cython.Build import cythonize
except ImportError:
extensions = [
Extension('ringing', ['src/ringing.cpp'], **EXTENSION_OPTIONS)
]
else:
extensions = cythonize([
Extension('ringing', ['src/ringing.pyx'], **EXTENSION_OPTIONS),
])
with open(os.path.join(BASE_DIR, 'VERSION')) as version_file:
version = version_file.read().strip()
with open(os.path.join(BASE_DIR, 'README.rst')) as file:
long_description = file.read()
setup(
name='ringing-lib',
version=version,
author='Leigh Simpson',
author_email='code@simpleigh.com',
url='https://github.com/ringing-lib/ringing-lib-python',
description='Python wrapper for the Ringing Class Library',
long_description=long_description,
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
license='GPL',
ext_modules=extensions,
test_suite='tests',
)