File size: 1,800 Bytes
ce4b573 | 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 | from setuptools import setup, Command, find_packages
import os
import sys
if sys.version_info < (3,0):
sys.exit('\nSorry, Python < 3.0 is not supported\nIf you have Python 3.x installed use: pip3 install wc.py')
sys.exit('')
currentFileDirectory = os.path.dirname(__file__)
with open(os.path.join(currentFileDirectory, "README.md"), "r") as f:
readme = f.read()
# Maintain dependencies of requirements.txt
with open('requirements.txt') as f:
requirements = f.read().splitlines()
class CleanCommand(Command):
"""Custom clean command to tidy up the project root."""
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
os.system('rm -vrf ./build ./dist ./*.pyc ./*.tgz ./*.egg-info ./**/__pycache__ ./__pycache__ ./.eggs ./.cache')
print(find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]))
setup(
name="wcpy",
version="1.2",
description="WordCount in Python with a lot more functionality",
long_description=readme,
author="Alejandro Saucedo",
author_email="a@e-x.io",
url="https://github.com/axsauze/wcpy",
classifiers=[
"Intended Audience :: Developers",
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
],
keywords="Word count (wcpy) on steroids",
license="MIT",
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
include_package_data=True,
install_requires=requirements,
scripts=('wc.py',),
data_files=[ (".", ["LICENSE"]) ],
setup_requires=['pytest-runner'],
tests_require=['pytest'],
test_suite='tests',
cmdclass={
'clean': CleanCommand
}
)
|