Skip to content

Commit

Permalink
Merge pull request #216 from BBN-Q/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
grahamrow authored Jul 23, 2019
2 parents 5fa919a + 0bb95b5 commit 146a533
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 4 deletions.
49 changes: 49 additions & 0 deletions publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/bash

# Usage: dist_pypi [production]
# Uses pypi test unless "production is supplied"

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

[[ $1 == "production" ]] && echo "*** PRODUCTION UPLOAD ***" || echo "*** TEST UPLOAD ***"
read -n 1 -s -r -p "Press any key to continue"

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 **"
if [[ $1 == "production" ]]; then
twine upload dist/*
else
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
fi

# Test with: pip install --extra-index-url https://test.pypi.org/simple/ bbndb

echo "** Creating conda skeleton **"
rm -rf skeleton
mkdir skeleton && pushd skeleton
if [[ $1 == "production" ]]; then
conda skeleton pypi --version=$version $pkg_name
else
conda skeleton pypi --version=$version --pypi-url https://test.pypi.io/pypi/ $pkg_name
fi
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
25 changes: 21 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
from setuptools import setup, find_packages

setup(name='QGL',
version='2.1',
url='https://github.com/BBN-Q/QGL',
version='2019.1',
packages=find_packages(exclude=["tests"]),
url='https://github.com/BBN-Q/QGL',
download_url='https://github.com/BBN-Q/QGL',
license="Apache 2.0 License",
install_requires=[
"bbndb >= 0.1",
"bbndb >= 2019.1",
"numpy >= 1.11.1",
"scipy >= 0.17.1",
"networkx >= 1.11",
"bqplot >= 0.11.5",
"sqlalchemy >= 1.2.15"
])
],
description="Quantum Gate Language (QGL) is a domain specific language embedded in python for specifying pulse sequences.",
long_description_content_type='text/markdown',
long_description=open('README.md').read(),
python_requires='>=3.6',
keywords="quantum qubit experiment configuration gate language"
)

# python setup.py sdist
# python setup.py bdist_wheel
# For testing:
# 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/ qgl

0 comments on commit 146a533

Please sign in to comment.