-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
51 lines (49 loc) · 1.5 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
from setuptools import setup
from setuptools.dist import Distribution
# Dogfood ourselves here. Since however we at this point might not be
# installed yet we cannot use snaek_rust_modules directly. Additionally
# we might not be able to import outselves yet because the setup
# requirements are not installed yet. In that case do nothing.
extra = {}
try:
from snaek import setuptools_ext
except ImportError:
pass
else:
class SneakDistribution(Distribution):
def __init__(self, *args, **kwargs):
Distribution.__init__(self, *args, **kwargs)
setuptools_ext.snaek_rust_modules(self, 'snaek_rust_modules', [
('snaek._bindgen', 'rust/'),
])
extra['distclass'] = SneakDistribution
setup(
name='snaek',
version='0.2.0',
author='Armin Ronacher',
author_email='armin.ronacher@active-4.com',
packages=['snaek'],
package_data={
'snaek': ['empty.c'],
},
description='A python library for distributing Rust modules.',
zip_safe=False,
platforms='any',
install_requires=[
'cffi>=1.6.0',
],
setup_requires=[
'cffi>=1.6.0',
],
entry_points={
'distutils.setup_keywords': [
'snaek_rust_modules = snaek.setuptools_ext:snaek_rust_modules',
'snaek_universal = snaek.setuptools_ext:snaek_universal',
],
},
classifiers=[
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python',
],
**extra
)