-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
39 lines (34 loc) · 1.29 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
import os
from setuptools import setup, Extension
from Cython.Build import cythonize
extension_modules = [
Extension ("zser.zser", ["zser/zser.pyx"], depends = ["zser/zser.pxd"])
]
include_dirs = os.environ.get("CYTHON_INCLUDE_DIRS", ".").split (":")
base_path = os.path.dirname (__file__)
with open (os.path.join (base_path, "VERSION")) as version:
VERSION = version.read().rstrip ()
with open (os.path.join (base_path, "zser/_version.py"), "w") as vfile:
vfile.write ('__version__ = "%s"' % VERSION)
with open (os.path.join (base_path, "requirements.txt")) as reqs:
requirements = reqs.read ()
setup (
name = "zser",
version = VERSION,
description = "zero-copy (de)serialization",
author = "Luciano Lo Giudice & Agustina Arzille",
author_email = "[email protected]",
maintainer = "Luciano Lo Giudice",
maintainer_email = "[email protected]",
url = "https://github.com/lmlg/zser/",
license = "LGPLv3",
packages = ["zser"],
package_dir = {"zser": "zser"},
tests_require = ["pytest"],
test_suite = "tests",
install_requires = requirements,
zip_safe = False,
ext_modules = cythonize (extension_modules, include_path = include_dirs,
language_level = 3, annotate = True,
compiler_directives = {'embedsignature': True}),
)