Repository navigation
Expand file tree
/
Copy pathsetup.py
More file actions
48 lines (39 loc) · 1.43 KB
/
Copy pathsetup.py
File metadata and controls
48 lines (39 loc) · 1.43 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
import os
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
# Read dependencies from requirements.txt included in the manifest
with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'requirements.txt')) as f:
DEPS = f.read().splitlines()
VERSION = '0.0.1'
class NoseTestCommand(TestCommand):
# http://fgimian.github.io/blog/2014/04/27/running-nose-tests-with-plugins-using-the-
# setuptools-test-command/
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
# Run nose ensuring that argv simulates running nosetests directly
import nose
nose.run_exit(argv=['nosetests'])
setup(
name='dircrawler',
version=VERSION,
author='Hari Kumar',
author_email='hari@harikumar.info',
maintainer='Hari Kumar',
maintainer_email='hari@harikumar.info',
description='dircrawl leverages python\'s os.walk and supports a set of operations during '
'traversal',
packages=find_packages(),
install_requires=DEPS,
include_package_data=True,
tests_require=['setuptools==30.0.0', 'nose==1.3.7', 'mock==2.0.0', 'pyfakefs==2.9',
'freezegun==0.3.7'],
cmdclass={'test': NoseTestCommand},
entry_points={
'console_scripts': [
'crawl = dircrawler.__main__:main'
],
}
)