diff options
author | Leonard Richardson <leonardr@segfault.org> | 2023-04-05 10:49:29 -0400 |
---|---|---|
committer | Leonard Richardson <leonardr@segfault.org> | 2023-04-05 10:49:29 -0400 |
commit | fb8179d217dfb11e81c28076fc3bf14bdf9a0038 (patch) | |
tree | cb22b2843cc7a148520424553acf9f94a108bba3 /prepare-release.sh | |
parent | 43038bb57e1379795db4363d9715fb238fb67f50 (diff) |
Prepare for 4.12.1 release.
Diffstat (limited to 'prepare-release.sh')
-rw-r--r-- | prepare-release.sh | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/prepare-release.sh b/prepare-release.sh index 599e92b..2f139d7 100644 --- a/prepare-release.sh +++ b/prepare-release.sh @@ -13,46 +13,47 @@ # bs4/__init__.py # doc/source/index.rst -# Make sure tests pass -python -m pytest bs4 +hatch clean +tox run-parallel -rm -rf build dist beautifulsoup4.egg-info - -# Make both sdist and wheels. -python3 setup.py sdist bdist_wheel +# Build sdist and wheel. +hatch build # Test the wheel locally. - rm -rf ../py3-install-test-virtualenv virtualenv -p /usr/bin/python3 ../py3-install-test-virtualenv source ../py3-install-test-virtualenv/bin/activate pip install dist/beautifulsoup4-*.whl pytest lxml html5lib soupsieve python -m pytest ../py3-install-test-virtualenv/lib/python3.10/site-packages/bs4/tests/ echo "EXPECT HTML ON LINE BELOW" -(cd .. && python -c "from bs4 import _s; print(_s('<a>foo', 'html.parser'))") -# That should print '<a>foo</a>' +(cd .. && which python && python -c "from bs4 import _s, __version__; print(__version__, _s('<a>foo', 'lxml'))") +# That should print something like: +# /home/.../py3-install-test-virtualenv/bin/python +# [new version number] <a>foo</a> + deactivate rm -rf ../py3-install-test-virtualenv -# Upload to test -twine upload --repository-url https://test.pypi.org/legacy/ dist/* +# Upload to test pypi +hatch publish -r test # Test install from test pypi - rm -rf ../py3-install-test-virtualenv virtualenv -p /usr/bin/python3 ../py3-install-test-virtualenv source ../py3-install-test-virtualenv/bin/activate pip install pytest lxml html5lib -pip install -i https://testpypi.python.org/pypi beautifulsoup4 --extra-index-url=https://pypi.python.org/pypi +pip install -i https://testpypi.python.org/pypi beautifulsoup4 --extra-index-url=https://pypi.python.org/pypi python -m pytest ../py3-install-test-virtualenv/lib/python3.10/site-packages/bs4/tests/ echo "EXPECT HTML ON LINE BELOW" -(cd .. && python -c "from bs4 import _s; print(_s('<a>foo', 'html.parser'))") -# That should print '<a>foo</a>' +(cd .. && which python && python -c "from bs4 import _s, __version__; print(__version__, _s('<a>foo', 'lxml'))") +# That should print something like: +# /home/.../py3-install-test-virtualenv/bin/python +# [new version number] <a>foo</a> deactivate rm -rf ../py3-install-test-virtualenv -# Upload for real -twine upload dist/* +# Upload to production pypi +hatch publish # Test install from production pypi @@ -61,7 +62,7 @@ virtualenv -p /usr/bin/python3 ../py3-install-test-virtualenv source ../py3-install-test-virtualenv/bin/activate pip install beautifulsoup4 echo "EXPECT HTML ON LINE BELOW" -(cd .. && python -c "from bs4 import _s; print(_s('<a>foo', 'html.parser'))") +(cd .. && which python && python -c "from bs4 import _s, __version__; print(__version__, _s('<a>foo', 'html.parser'))") # That should print '<a>foo</a>' deactivate rm -rf ../py3-install-test-virtualenv |