-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #216 from BBN-Q/develop
Develop
- Loading branch information
Showing
2 changed files
with
70 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |