Skip to content

Commit

Permalink
Working PyPi and conda build (using skeleton)
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamrow committed Jul 23, 2019
1 parent bc96c71 commit f657afe
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
44 changes: 44 additions & 0 deletions dist_pypi_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash

pkg_name=$(python setup.py --name) #"bbndb"
version=$(python setup.py --version) # "2019.1.2"
echo "DISTRIBUTING $pkg_name VERSION $version"

echo "** Removing dist directory **"
rm -rf dist

echo "** Creating source distribution **"
python setup.py sdist

echo "** Creating wheel distribution **"
python setup.py bdist_wheel

echo "** Uploading to test pypi **"
twine upload --repository-url https://test.pypi.org/legacy/ dist/*

# For distribution:
# twine upload dist/*
# Test with:
# pip install --extra-index-url https://test.pypi.org/simple/ bbndb


# channels=$(conda config --show channels)

# echo "** Adding conda-forge to channels"
# conda config --add channels conda-forge

echo "** Creating conda skeleton **"
rm -rf skeleton
mkdir skeleton && pushd skeleton
conda skeleton pypi --version=$version --pypi-url https://test.pypi.io/pypi/ $pkg_name
pushd $pkg_name

echo "** Please modify the meta.yaml in skeleton/$pkg_name to include \"noarch: python\" in the build section."
read -n 1 -s -r -p "Press any key to continue"

anaconda login
conda config --set anaconda_upload yes
conda build -c conda-forge .
conda config --set anaconda_upload no

popd && popd
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages

setup(name='QGL',
version='2019.1.1',
version='2019.1.2',
packages=find_packages(exclude=["tests"]),
url='https://github.com/BBN-Q/QGL',
download_url='https://github.com/BBN-Q/QGL',
Expand Down

0 comments on commit f657afe

Please sign in to comment.