forked from wolph/numpy-stl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
51 lines (45 loc) · 1.42 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
import os
import sys
from stl import metadata
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
if os.path.isfile('README.rst'):
long_description = open('README.rst').read()
else:
long_description = 'See http://pypi.python.org/pypi/%s/' % (
metadata.__package_name__)
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
# import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
setup(
name=metadata.__package_name__,
version=metadata.__version__,
author=metadata.__author__,
author_email=metadata.__author_email__,
description=metadata.__description__,
url=metadata.__url__,
license='BSD',
packages=find_packages(),
long_description=long_description,
tests_require=['pytest'],
cmdclass={'test': PyTest},
entry_points={
'console_scripts': [
'stl = %s.main:main' % metadata.__import_name__,
'stl2ascii = %s.main:to_ascii' % metadata.__import_name__,
'stl2bin = %s.main:to_binary' % metadata.__import_name__,
],
},
classifiers=['License :: OSI Approved :: BSD License'],
install_requires=[
'numpy',
'python-utils>=1.6.1',
],
)