Skip to content

Instantly share code, notes, and snippets.

@dln
Last active November 30, 2017 10:10
Show Gist options
  • Save dln/2338ba874209afd4da2e to your computer and use it in GitHub Desktop.
Save dln/2338ba874209afd4da2e to your computer and use it in GitHub Desktop.
#!/bin/bash
set -ex
rm -rf build
mkdir build
python -m virtualenv ./build/venv/
./build/venv/bin/pip install --upgrade wheel pex setuptools
./build/venv/bin/python setup.py bdist_wheel
./build/venv/bin/pex --cache-dir build/pex-cache --repo dist/ -r myprogram -e myprogram:main -o dist/myprogram
boto==2.36.0
flask==0.10.1
from setuptools import setup
import os
directory = os.path.dirname(__file__)
with open(os.path.join(directory, 'requirements.txt')) as requirements_file:
requirements = requirements_file.read().splitlines()
setup(
name='myprogram',
version='0.0.1',
url='https://example.com/myprogram',
license='Public Domain',
author='dln@eintr.org',
description='My incredible program',
long_description=__doc__,
packages=[
'myprogram',
],
zip_safe=False,
platforms='any',
install_requires=requirements,
entry_points={
'console_scripts': ['myprogram=myprogram:main']
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment