diff --git a/publish.sh b/publish.sh new file mode 100755 index 00000000..6edf4df7 --- /dev/null +++ b/publish.sh @@ -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 \ No newline at end of file diff --git a/setup.py b/setup.py index 07db1d0b..8f8829dc 100644 --- a/setup.py +++ b/setup.py @@ -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 \ No newline at end of file