|
1
|
|
|
#!/usr/bin/env python |
|
2
|
|
|
# -*- coding: utf-8 -*- |
|
3
|
|
|
|
|
4
|
|
|
"""dkfileutils - short description |
|
5
|
|
|
""" |
|
6
|
|
|
import sys |
|
7
|
|
|
|
|
8
|
|
|
classifiers = """\ |
|
9
|
|
|
Development Status :: 5 - Production/Stable |
|
10
|
|
|
Intended Audience :: Developers |
|
11
|
|
|
Programming Language :: Python |
|
12
|
|
|
Programming Language :: Python :: 2 |
|
13
|
|
|
Programming Language :: Python :: 3.4 |
|
14
|
|
|
Programming Language :: Python :: 3.5 |
|
15
|
|
|
Programming Language :: Python :: 3.6 |
|
16
|
|
|
Topic :: Software Development :: Libraries |
|
17
|
|
|
""" |
|
18
|
|
|
|
|
19
|
|
|
import setuptools |
|
20
|
|
|
from distutils.core import setup, Command |
|
21
|
|
|
from setuptools.command.test import test as TestCommand |
|
22
|
|
|
|
|
23
|
|
|
version = '1.4.1' |
|
24
|
|
|
|
|
25
|
|
|
|
|
26
|
|
|
class PyTest(TestCommand): |
|
27
|
|
|
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")] |
|
28
|
|
|
|
|
29
|
|
|
def initialize_options(self): |
|
30
|
|
|
TestCommand.initialize_options(self) |
|
31
|
|
|
self.pytest_args = [] |
|
32
|
|
|
|
|
33
|
|
|
def finalize_options(self): |
|
34
|
|
|
TestCommand.finalize_options(self) |
|
35
|
|
|
self.test_args = [] |
|
36
|
|
|
self.test_suite = True |
|
37
|
|
|
|
|
38
|
|
|
def run_tests(self): |
|
39
|
|
|
# import here, cause outside the eggs aren't loaded |
|
40
|
|
|
import pytest |
|
41
|
|
|
errno = pytest.main(self.pytest_args) |
|
42
|
|
|
sys.exit(errno) |
|
43
|
|
|
|
|
44
|
|
|
|
|
45
|
|
|
setup( |
|
46
|
|
|
name='dkfileutils', |
|
47
|
|
|
version=version, |
|
48
|
|
|
author='Bjorn Pettersen', |
|
49
|
|
|
author_email='[email protected]', |
|
50
|
|
|
url='https://github.com/datakortet/dkfileutils/', |
|
51
|
|
|
requires=[], |
|
52
|
|
|
install_requires=[], |
|
53
|
|
|
description=__doc__.strip(), |
|
54
|
|
|
classifiers=[line for line in classifiers.split('\n') if line], |
|
55
|
|
|
long_description=open('README.rst').read(), |
|
56
|
|
|
cmdclass={'test': PyTest}, |
|
57
|
|
|
packages=['dkfileutils'], |
|
58
|
|
|
zip_safe=False, |
|
59
|
|
|
) |
|
60
|
|
|
|