-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include fk12306/data/*.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
clean: | ||
pip uninstall fk12306 -y | ||
rm -fr build dist .egg *.egg-info | ||
find . | grep __pycache__ | xargs rm -fr | ||
find . | grep .pyc | xargs rm -f | ||
|
||
install: | ||
python3 setup.py install | ||
|
||
publish: | ||
pip3 install 'twine>=1.5.0' | ||
python3 setup.py sdist bdist_wheel | ||
twine upload dist/* | ||
rm -fr build .egg requests.egg-info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#!/usr/bin/env python | ||
# -*- coding:utf-8 -*- | ||
""" | ||
@author: HJK | ||
@file: setup.py.py | ||
@time: 2019-02-11 | ||
""" | ||
|
||
import os | ||
import sys | ||
import setuptools | ||
|
||
# 'setup.py publish' shortcut. | ||
if sys.argv[-1] == 'publish': | ||
os.system('rm -rf dist') | ||
os.system('python setup.py sdist bdist_wheel') | ||
os.system('twine upload dist/*') | ||
sys.exit() | ||
|
||
here = os.path.abspath(os.path.dirname(__file__)) | ||
about = {} | ||
with open(os.path.join(here, 'fk12306', '__version__.py'), 'r', encoding='utf-8') as f: | ||
exec(f.read(), about) | ||
|
||
with open('README.md', 'r', encoding='utf-8') as fh: | ||
long_description = fh.read() | ||
|
||
setuptools.setup( | ||
name=about['__title__'], | ||
version=about['__version__'], | ||
description=about['__description__'], | ||
author=about['__author__'], | ||
author_email=about['__author_email__'], | ||
url=about['__url__'], | ||
license=about['__license__'], | ||
long_description=long_description, | ||
long_description_content_type='text/markdown', | ||
packages=setuptools.find_packages(), | ||
# package_data={'fk12306': ['data']}, | ||
include_package_data=True, | ||
test_suite = 'tests', | ||
entry_points={ | ||
'console_scripts': [ | ||
'fk12306 = fk12306.__init__:main', | ||
], | ||
}, | ||
install_requires=[ | ||
'requests', | ||
'click', | ||
'prettytable', | ||
], | ||
classifiers=[ | ||
'Development Status :: 4 - Beta', | ||
'Environment :: Console', | ||
'Intended Audience :: Developers', | ||
'Intended Audience :: End Users/Desktop', | ||
'License :: OSI Approved :: MIT License', | ||
'Operating System :: OS Independent', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3 :: Only', | ||
'Programming Language :: Python :: 3.5', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
'Topic :: Internet', | ||
'Topic :: Internet :: WWW/HTTP', | ||
'Topic :: Utilities' | ||
], | ||
) |