-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
89 lines (75 loc) · 3.14 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
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
from distutils.extension import Extension
from os import path
try:
from Cython.Build import cythonize
USE_CYTHON = True
except ImportError:
USE_CYTHON = False
ext = '.pyx' if USE_CYTHON else '.c'
extensions = [Extension("fmmap", ["src/fmmap"+ext], include_dirs=["src"])]
if USE_CYTHON:
from Cython.Build import cythonize
extensions = cythonize(extensions)
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='fmmap',
version='2.0.0',
description='A fast reimplementation of mmap',
long_description=long_description,
author='Friedel Wolff',
author_email='[email protected]',
# For a list of valid classifiers, see https://pypi.org/classifiers/
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
'Programming Language :: Cython',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Operating System :: POSIX :: Linux',
'Operating System :: POSIX :: BSD :: FreeBSD',
'Operating System :: POSIX :: BSD :: NetBSD',
'Operating System :: POSIX :: BSD :: OpenBSD',
'Operating System :: POSIX :: SunOS/Solaris',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
],
# Note that this is a string of words separated by whitespace, not a list.
keywords='mmap',
package_dir={'': 'src'},
ext_modules=extensions,
# Specify which Python versions you support. In contrast to the
# 'Programming Language' classifiers above, 'pip install' will check this
# and refuse to install the project if the version does not match. If you
# do not support Python 2, you can simplify this to '>=3.5' or similar, see
# https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires
python_requires='>=3.4, <4',
# List additional groups of dependencies here (e.g. development
# dependencies). Users will be able to install these using the "extras"
# syntax, for example:
#
# $ pip install sampleproject[dev]
#
# Similar to `install_requires` above, these must be valid existing
# projects.
extras_require={ # Optional
'dev': ['check-manifest'],
'test': ['coverage'],
},
url='https://github.com/friedelwolff/fmmap/',
# This field corresponds to the "Project-URL" metadata fields:
# https://packaging.python.org/specifications/core-metadata/#project-url-multiple-use
project_urls={
'Bug Reports': 'https://github.com/friedelwolff/fmmap/issues',
'Source': 'https://github.com/friedelwolff/fmmap/',
},
)