forked from Pyrlang/Term
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
33 lines (29 loc) · 1.09 KB
/
Copy pathsetup.py
File metadata and controls
33 lines (29 loc) · 1.09 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
from setuptools import setup
VERSION = '1.2'
PKGNAME = "pyrlang-term"
MODULENAME = "term"
DESCR = 'Erlang term and External Term Format codec in Python and native Rust extension'
AUTHOR = 'Erlang Solutions Ltd and S2HC Sweden AB'
AUTHOR_EMAIL = 'dmytro.lytovchenko@gmail.com, pyrlang@s2hc.com'
try:
from setuptools_rust import Binding, RustExtension
setup(name=PKGNAME,
version=VERSION,
description=DESCR,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
rust_extensions=[RustExtension("term.native_codec_impl",
binding=Binding.RustCPython)],
packages=[MODULENAME],
# rust extensions are not zip safe, just like C-extensions.
zip_safe=False)
except:
print("----------------------------")
print("Rust Setuptools not found, continue with Python slow implementation only")
print("----------------------------")
setup(name=PKGNAME,
version=VERSION,
description=DESCR,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
packages=[MODULENAME])