-
Notifications
You must be signed in to change notification settings - Fork 12
/
setup.py
62 lines (54 loc) · 2.1 KB
/
setup.py
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
60
61
62
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from setuptools import setup
try: # For pip >= 10
from pip._internal.req import parse_requirements
except ImportError: # For pip <= 9
from pip.req import parse_requirements
__version__ = '0.1.2' # Should match with __init.py__
_PACKAGE_NAME = 'trainline'
_GITHUB_URL = 'https://github.com/tducret/trainline-python'
_KEYWORDS = ['api', 'trainline', 'parsing', 'train', 'sncf',
'python-wrapper', 'scraping', 'scraper', 'parser']
_SCRIPTS = ['trainline_cli.py']
_PACKAGE_DATA = ['stations_mini.csv']
install_reqs = parse_requirements('requirements.txt', session='hack')
try:
requirements = [str(ir.req) for ir in install_reqs]
except:
requirements = [str(ir.requirement) for ir in install_reqs]
setup(
name=_PACKAGE_NAME,
packages=[_PACKAGE_NAME],
package_data={_PACKAGE_NAME: _PACKAGE_DATA, },
scripts=_SCRIPTS,
version=__version__,
license="MIT license",
platforms='Posix; MacOS X',
description="Non-official Python wrapper and CLI tool for Trainline",
long_description="Non-official Python wrapper and CLI tool for Trainline",
author="Thibault Ducret",
author_email='[email protected]',
url=_GITHUB_URL,
download_url='{github_url}/tarball/{version}'.format(
github_url=_GITHUB_URL,
version=__version__),
keywords=_KEYWORDS,
setup_requires=requirements,
install_requires=requirements,
classifiers=[
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
],
python_requires='>=3',
tests_require=['pytest'],
)
# ------------------------------------------
# To upload a new version on pypi
# ------------------------------------------
# Make sure everything was pushed (with a git status)
# (or git commit --am "Comment" and git push)
# export VERSION=0.1.2; git tag $VERSION -m "Fix pip install issue #13 + TGV max #17"; git push --tags
# If you need to delete a tag
# git push --delete origin $VERSION; git tag -d $VERSION