Skip to content

Commit

Permalink
Fix pypi run + add wheel distribution.
Browse files Browse the repository at this point in the history
  • Loading branch information
ikogan committed Sep 26, 2019
1 parent e6f1330 commit fcaa079
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ install:
- pip install staticx pyinstaller jinja2
script:
- python setup.py test
- python setup.py build
- python setup.py bdist_egg bdist_wheel
- python -OO -m PyInstaller -F j2tmpl/cli.py -n j2tmpl
- staticx dist/j2tmpl dist/j2tmpl
deploy:
Expand All @@ -29,6 +29,7 @@ deploy:
file:
- dist/j2tmpl
- dist/j2tmpl-*.egg
- dist/j2tmpl-*.whl
draft: true
overwrite: true
skip_cleanup: true
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ FROM python:3.7
RUN apt-get update && apt-get install -y binutils patchelf upx && rm -rf /var/lib/apt/lists/*
RUN pip3 install staticx pyinstaller jinja2

COPY build.sh /app/
RUN chmod +x /app/build.sh

COPY setup.* /app/
COPY build.sh /app
COPY j2tmpl /app/j2tmpl
COPY README.md /app
COPY tests /app/tests
COPY README.md /app/

RUN chmod +x /app/build.sh
COPY j2tmpl /app/j2tmpl

WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [[ -e /proc/1/cgroup ]] && (grep -q docker /proc/1/cgroup || grep -q user.sli
find . -name '*.pyc' -delete
rm -Rf dist/*
python3 setup.py test
python3 setup.py build
python3 setup.py bdist_egg bdist_wheel
python3 -OO -m PyInstaller -F j2tmpl/cli.py -n j2tmpl
staticx dist/j2tmpl dist/j2tmpl
else
Expand Down
6 changes: 6 additions & 0 deletions j2tmpl/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
from j2tmpl.cli import main, __doc__ # noqa: F401


def entrypoint():
import sys

main(sys.argv[1:])
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="j2tmpl",
version="0.0.10",
version="0.0.11",
author="Ilya Kogan",
author_email="[email protected]",
url="https://github.com/ikogan/j2tmpl",
Expand All @@ -27,15 +27,14 @@
setup_requires=["pytest-runner"],
tests_require=install_requires + tests_requires,
include_package_data=True,
entry_points={"console_scripts": ["j2tmpl = j2tmpl:main"]},
entry_points={"console_scripts": ["j2tmpl = j2tmpl:entrypoint"]},
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Operating System :: OS Independent",
"Topic :: Software Development",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
Expand Down

0 comments on commit fcaa079

Please sign in to comment.