1# -*- coding:utf-8 -*-
2
3import os
4import sys
5
6from setuptools import setup, find_packages
7
8here = os.path.abspath(os.path.dirname(__file__))
9try:
10    with open(os.path.join(here, "README.rst")) as f:
11        README = f.read()
12    with open(os.path.join(here, "CHANGES.txt")) as f:
13        CHANGES = f.read()
14except IOError:
15    README = CHANGES = ""
16
17install_requires = []
18
19docs_extras = []
20
21tests_require = ["pytest"]
22testing_extras = tests_require + []
23
24from setuptools.command.test import test as TestCommand
25
26
27class PyTest(TestCommand):
28    def finalize_options(self):
29        TestCommand.finalize_options(self)
30        self.test_args = []
31        self.test_suite = True
32
33    def run_tests(self):
34        import pytest
35
36        pytest.main(self.test_args)
37
38
39setup(
40    name="node-semver",
41    version="0.8.0",
42    description="port of node-semver",
43    long_description=README + "\n\n" + CHANGES,
44    classifiers=[
45        "Programming Language :: Python",
46        "Programming Language :: Python :: 3",
47        "Programming Language :: Python :: Implementation :: CPython",
48    ],
49    keywords="version semver",
50    author="podhmo",
51    author_email="ababjam61+github@gmail.com",
52    url="https://github.com/podhmo/python-semver",
53    packages=find_packages(exclude=["semver.tests"]),
54    include_package_data=True,
55    zip_safe=False,
56    install_requires=install_requires,
57    extras_require={"testing": testing_extras, "docs": docs_extras},
58    tests_require=tests_require,
59    cmdclass={"test": PyTest},
60    entry_points="""      """,
61    license="mit",
62)
63