-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.py
47 lines (43 loc) · 1.6 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
import os
from setuptools import setup, find_packages
from distutils.extension import Extension
HERE = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(HERE, 'README.rst')) as readme_file:
README = readme_file.read()
C_KMEANS = Extension(
'kmeans/lib',
sources=['kmeans/lib.c'],
extra_compile_args=['-Wno-error=declaration-after-statement',
'-O3', '-std=c99']
)
# The packaging is a little wonky. I've been fighting with tox to try to
# load the dll from the correct relative path, but
# kmeans.__init__:os.path.dirname(os.path.realpath(__file__)) just
# refuses to point anywhere BUT the .tox path.
# To get over that, I moved everything under the kmeans/ folder and for now,
# if it works that's cool. It's not clean and I don't like it, but it's also
# 1:30 am
setup(
name='kmeans',
version='1.0.2',
url='http://github.com/numberoverzero/kmeans/',
license='MIT',
author='Joe Cross',
install_requires=[],
author_email='[email protected]',
description='python wrapper for basic c implementation of kmeans',
long_description=README,
include_package_data=True,
platforms='any',
classifiers=[
'Programming Language :: Python',
'Development Status :: 5 - Production/Stable',
'Natural Language :: English',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Topic :: Software Development :: Libraries :: Python Modules',
],
packages=find_packages(exclude=('tests',)),
ext_modules=[C_KMEANS]
)