From 3cbd050cc5e4a72a85199f0fade1cddbf05254e8 Mon Sep 17 00:00:00 2001 From: Nick Telfer Date: Wed, 26 Sep 2018 17:25:52 -0600 Subject: [PATCH] fix for packaging the frontend files into a .whl file for upload to pypi --- docs/building_releases.md | 11 ++++++++++- setup.py | 19 +++++++++++++++++-- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/docs/building_releases.md b/docs/building_releases.md index fffc24e..24f53c7 100644 --- a/docs/building_releases.md +++ b/docs/building_releases.md @@ -2,9 +2,10 @@ Use Semantic versioning as described [here](https://semver.org/) when releasing any new code. # Building Wheels -Make sure you have installed wheel with pip +Make sure you have installed the packaging dependencies with pip ```bash pip install wheel +pip install twine ``` Then run these commands @@ -14,6 +15,14 @@ python3 setup.py sdist bdist_wheel ``` # Uploading to Pypi + +## Test +```bash +twine upload --repository-url https://test.pypi.org/legacy/ dist/* +pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple didery +``` + +## Live ```bash twine upload dist/* ``` diff --git a/setup.py b/setup.py index ec54e6e..5e4d876 100644 --- a/setup.py +++ b/setup.py @@ -92,7 +92,7 @@ def _unavailable(self, e): setup( name='didery', - version='0.0.2', + version='0.0.3', license='Apache2', description='DIDery Key Management Server', long_description="Redundant persistent backup of key rotation events and otp encrypted private keys.", @@ -102,6 +102,21 @@ def _unavailable(self, e): packages=find_packages('src'), package_dir={'': 'src'}, py_modules=[splitext(basename(path))[0] for path in glob('src/*.py')], + package_data={ + 'didery': ['static/main.html', + 'static/css/*.css', + 'static/fonts/Raleway/*.ttf', + 'static/node_modules/mithril/mithril.min.js', + 'static/node_modules/jquery/dist/jquery.min.js', + 'static/node_modules/semantic-ui/dist/semantic.min.css', + 'static/node_modules/semantic-ui/dist/semantic.min.js', + 'static/node_modules/semantic-ui/dist/themes/default/assets/fonts/*.woff2', + 'static/node_modules/semantic-ui/dist/themes/default/assets/fonts/*.woff', + 'static/node_modules/semantic-ui/dist/themes/default/assets/fonts/*.ttf', + 'static/transcrypt/__javascript__/main.js', + 'flo/*.flo' + ] + }, include_package_data=True, zip_safe=False, classifiers=[ @@ -122,7 +137,7 @@ def _unavailable(self, e): install_requires=[ 'click', 'falcon>=1.2', 'ioflo>=1.6.8', 'libnacl>=1.5.1', 'simplejson>=3.11.1', 'pytest-falcon>=0.4.2', 'arrow>=0.10.0', - 'lmdb', + 'transcrypt<=3.6.101', 'lmdb', ], extras_require={ # eg: