forked from aio-libs/aioftp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
58 lines (49 loc) · 1.64 KB
/
setup.py
File metadata and controls
58 lines (49 loc) · 1.64 KB
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
import re
import pathlib
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
BASE_PATH = pathlib.Path(__file__).parent
try:
version = re.findall(r"""^__version__ = "([^']+)"\r?$""",
(BASE_PATH / "aioftp" / "__init__.py").read_text(),
re.M)[0]
except IndexError:
raise RuntimeError("Unable to determine version.")
class NoseTestCommand(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pathlib
import shutil
import nose
for path in pathlib.Path("tests").glob("*"):
if path.is_dir():
shutil.rmtree(str(path))
cov = pathlib.Path(".coverage")
if cov.exists():
cov.unlink()
nose.main(argv=["nosetests"])
setup(
name="aioftp",
version=version,
description=("ftp client/server for asyncio"),
long_description=(BASE_PATH / "README.rst").read_text(),
classifiers=[
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Topic :: Internet :: File Transfer Protocol (FTP)",
],
author="pohmelie",
author_email="multisosnooley@gmail.com",
url="https://github.com/aio-libs/aioftp",
license="Apache 2",
packages=find_packages(),
python_requires=" >= 3.5.3",
install_requires=[],
tests_require=["nose", "coverage", "trustme"],
cmdclass={"test": NoseTestCommand},
include_package_data=True
)