-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change ./checkin.py into an entrypoint #71
base: master
Are you sure you want to change the base?
Changes from 8 commits
b0056e7
20c9048
2fffa6f
80451c5
0892c36
9f4536e
136f2fa
383d390
d0fa161
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
*.pyc | ||
Dockerfile | ||
README.md | ||
htmlcov/ | ||
*.xml |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,8 @@ | |
.cache/ | ||
.coverage | ||
htmlcov/ | ||
coverage.xml | ||
coverage.xml | ||
.DS_Store | ||
*.egg-info/ | ||
dist/ | ||
*venv |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
FROM python:3.7 | ||
WORKDIR /usr/src/app | ||
|
||
COPY requirements.txt ./ | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
COPY . . | ||
RUN pip install .[dev] --no-cache-dir | ||
|
||
ENTRYPOINT ["./entrypoint.sh"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
include README.md | ||
include LICENSE | ||
include southwest/VERSION |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
set -e | ||
|
||
if [ "$1" != "/bin/sh" ]; then | ||
python -u ./checkin.py "$@" | ||
checkin "$@" | ||
else | ||
exec "$@" | ||
fi |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
"""setup.py | ||
|
||
Packaging for direct pypi distribution and cli entrypoints | ||
|
||
""" | ||
from setuptools import setup, find_packages | ||
from os import path | ||
from codecs import open | ||
|
||
__library_name__ = "southwest" | ||
__here__ = path.dirname(__file__) | ||
|
||
with open(path.join(__here__,"README.md"), "r", "utf-8") as f: | ||
__readme__ = f.read() | ||
|
||
with open(path.join(__here__, __library_name__ , "VERSION"), "r") as f: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Whitespace before ',' |
||
__version__ = f.read().strip() | ||
|
||
|
||
setup( | ||
name="SouthwestCheckin", | ||
description="Python script to checkin to a Southwest Flight", | ||
long_description=__readme__, | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/pyro2927/SouthwestCheckin", | ||
license="GPL-3.0", | ||
packages=find_packages(exclude=["tests"]), | ||
version=__version__, | ||
install_requires=[ | ||
"datetime", | ||
"docopts", | ||
"python-dateutil", | ||
"pytz", | ||
"requests", | ||
"uuid", | ||
"vcrpy", | ||
], | ||
extras_require={ | ||
"dev": ["pycodestyle", "pytest", "pytest-cov", "pytest-mock", "requests_mock",] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing whitespace after ',' There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://github.com/psf/black does not agree? |
||
}, | ||
entry_points={ | ||
"console_scripts": ["checkin={}.checkin:checkin".format(__library_name__)] | ||
}, | ||
package_data={"": ["README.md", "LICENSE"], __library_name__: ["VERSION"]}, | ||
include_package_data=True, | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.0.0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
import pkgutil | ||
|
||
from .southwest import Reservation | ||
from .openflights import timezone_for_airport | ||
|
||
__library_name__ = "southwest" | ||
__version__ = pkgutil.get_data(__library_name__, "VERSION").decode("utf-8") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing whitespace after ','