diff --git a/Makefile b/Makefile index 6ffaf819a2..93918ab7f8 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,7 @@ install: all $(PYTHON) setup.py install dist: FORCE + rm -rf dist/ build sourmash.egg-info $(PYTHON) setup.py sdist test: all diff --git a/doc/release.md b/doc/release.md index 4710fdb15c..9ba0cf5c8e 100644 --- a/doc/release.md +++ b/doc/release.md @@ -8,7 +8,7 @@ Michael Crusoe. Remember to update release numbers/RC in: * this document -* setup.py +* sourmash/VERSION ## Testing a release @@ -27,7 +27,7 @@ cd sourmash and then tag the release candidate with the new version number prefixed by the letter 'v': ``` - git tag v${new_version}-${rc} + git tag -a v${new_version}-${rc} git push --tags git@github.com:dib-lab/sourmash.git ``` 3\. Test the release candidate. Bonus: repeat on Mac OS X: @@ -45,32 +45,26 @@ cd sourmash cd sourmash pip install -r requirements.txt make test - pip uninstall -y sourmash; pip uninstall -y sourmash; make install - mkdir ../not-sourmash # if there is a subdir named 'sourmash' py.test will execute tests - # there instead of the installed sourmash module's tests - pushd ../not-sourmash; py.test --pyargs sourmash; popd - # Secondly we test via pip cd ../../testenv2 + deactivate source bin/activate - pip install -U setuptools==3.4.1 + pip install -U setuptools pip install -e git+https://github.com/dib-lab/sourmash.git@v${new_version}-${rc}#egg=sourmash[test] cd src/sourmash make test make dist cp dist/sourmash*tar.gz ../../../testenv3/ - pip uninstall -y sourmash; pip uninstall -y sourmash; make install - cd ../.. # no subdir named sourmash here, safe for testing installed sourmash module - py.test --pyargs sourmash # Is the distribution in testenv2 complete enough to build another # functional distribution? cd ../testenv3/ + deactivate source bin/activate - pip install -U setuptools==3.4.1 + pip install -U setuptools pip install sourmash*tar.gz pip install pytest tar xzf sourmash*tar.gz @@ -78,29 +72,25 @@ cd sourmash pip install -r requirements.txt make dist make test - pip uninstall -y sourmash; pip uninstall -y sourmash; make install - mkdir ../not-sourmash - pushd ../not-sourmash ; py.test --pyargs sourmash ; popd ``` 4\. Publish the new release on the testing PyPI server. You will need to change your PyPI credentials as documented here: - https://wiki.python.org/moin/TestPyPI. You may need to re-register: -``` - python setup.py register --repository test -``` - Now, upload the new release: + https://packaging.python.org/tutorials/packaging-projects/#uploading-the-distribution-archives + We will be using `twine` to upload the package to TestPyPI and verify + everything works before sending it to PyPI: ``` - python setup.py sdist upload -r test + pip install twine + twine upload --repository-url https://test.pypi.org/legacy/ sourmash*.tar.gz ``` Test the PyPI release in a new virtualenv: ``` cd ../../testenv4 + deactivate source bin/activate - pip install -U setuptools==3.4.1 + pip install -U setuptools # install as much as possible from non-test server! - pip install screed pytest numpy matplotlib scipy - pip install -i https://testpypi.python.org/pypi --pre --no-clean sourmash - py.test --pyargs sourmash + pip install screed pytest numpy matplotlib scipy khmer ijson + pip install -i https://test.pypi.org/simple --pre sourmash ``` 5\. Do any final testing: @@ -108,7 +98,6 @@ cd sourmash ## How to make a final release - When you've got a thoroughly tested release candidate, cut a release like so: @@ -117,7 +106,8 @@ so: ``` cd ../sourmash git tag v${new_version} - python setup.py register sdist upload + make dist + twine upload dist/*.tar.gz ``` 2\. Delete the release candidate tag and push the tag updates to GitHub: ``` @@ -128,21 +118,21 @@ so: 3\. Add the release on GitHub, using the tag you just pushed. Name it 'version X.Y.Z', and copy and paste in the release notes: -4\. Make a binary wheel on OS X: -``` - virtualenv build - cd build - source bin/activate - pip install -U setuptools==3.4.1 wheel - pip install --no-clean sourmash==${new_version} - cd ../ - python ./setup.py bdist_wheel upload -``` +## Bioconda + +Open a new PR in Bioconda. This is the file that needs to be changed: +https://github.com/bioconda/bioconda-recipes/blob/master/recipes/sourmash/meta.yaml + +Usually you need to change the `version` variable in the first line +and the `sha256` under the `source` section. + +This is an example PR (for `2.0.0a10`): https://github.com/bioconda/bioconda-recipes/pull/11197 + ## To test on a blank Ubuntu system ``` apt-cache update && apt-get -y install python-dev libfreetype6-dev && \ - pip install sourmash[test] && py.test --pyargs sourmash + pip install sourmash[test] ```