-
Notifications
You must be signed in to change notification settings - Fork 95
/
setup.py
62 lines (51 loc) · 1.79 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
52
53
54
55
56
57
58
59
60
61
62
#!/usr/bin/python3
import os
import re
import sys
import setuptools
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = []
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
errno = pytest.main(self.pytest_args)
sys.exit(errno)
PKG_DIR = os.path.dirname(__file__)
with open(os.path.join(PKG_DIR, 'ipfs', '__init__.py')) as VERSION_FILE:
VERSION = (re.compile(r".*__version__ = '(.*?)'", re.S)
.match(VERSION_FILE.read())
.group(1))
# The python package index understands .rst but we send it .md anyways.
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as README_FILE:
README = README_FILE.read()
setuptools.setup(
name='ipfs',
description='An implementation of IPFS in Python',
long_description=README,
author='bmcorser',
author_email='[email protected]',
version=VERSION,
packages=setuptools.find_packages(),
tests_require=['pytest'],
python_requires='>=3.4',
cmdclass={'test': PyTest},
classifiers=[
'Development Status :: 1 - Planning',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: POSIX',
'Programming Language :: Python',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: System :: Filesystems',
],
)