Skip to content
This repository was archived by the owner on Nov 19, 2020. It is now read-only.

Commit f5b54f5

Browse files
author
Thomas Preston
authored
Merge pull request #25 from mtreinish/cythonize-on-build
Switch to setuptools and add cythonize to build
2 parents c28708b + 35a6c20 commit f5b54f5

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
lirc/lirc.c
2+
dist/
3+
python_lirc.egg-info/
4+
build/

MANIFEST

Lines changed: 0 additions & 5 deletions
This file was deleted.

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Cython==0.28.2
1+
Cython>=0.28.2

setup.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import sys
2-
from distutils.core import setup, Extension
2+
from setuptools import setup, Extension, find_packages
3+
from Cython.Build import cythonize
34

45

56
lirc_ext = Extension(
67
'lirc',
78
include_dirs=['/usr/include/lirc/'],
89
libraries=['lirc_client'],
910
library_dirs=['/usr/lib'],
10-
sources=['lirc/lirc.c']
11+
sources=['lirc/lirc.pyx']
1112
)
1213

1314
setup(
@@ -18,7 +19,10 @@
1819
author_email='thomasmarkpreston@gmail.com',
1920
license='GPLv3+',
2021
url='https://github.com/tompreston/python-lirc',
21-
ext_modules=[lirc_ext],
22+
setup_requires=['Cython>=0.28.2'],
23+
packages=find_packages(),
24+
ext_modules=cythonize([lirc_ext]),
25+
zip_safe=False,
2226
long_description=open('README.md').read() + open('CHANGELOG').read(),
2327
classifiers=[
2428
"License :: OSI Approved :: GNU Affero General Public License v3 or "

0 commit comments

Comments
 (0)