diff options
author | Leonard Richardson <leonardr@segfault.org> | 2015-07-03 11:18:38 -0400 |
---|---|---|
committer | Leonard Richardson <leonardr@segfault.org> | 2015-07-03 11:18:38 -0400 |
commit | 245f6ee499c78bbc45c6bbeb225898392654f676 (patch) | |
tree | 7cf182a8ee22e02f6830acc92ba94d55f52c2d35 | |
parent | 5881585f01efc14e1736f3056366d290a1498635 (diff) |
Turns out setup.py requiring lxml was never in a released version which is a big relief as we don't need that anymore.
-rw-r--r-- | NEWS.txt | 10 | ||||
-rw-r--r-- | prepare-release.sh | 41 | ||||
-rw-r--r-- | setup.py | 2 |
3 files changed, 42 insertions, 11 deletions
@@ -2,16 +2,6 @@ Especially important changes: -* Currently lxml is a mandatory dependency of Beautiful Soup when - installed via pip. In the near future, lxml will become an optional - dependency. Requiring lxml makes it more difficult to install - Beautiful Soup, and recent improvements to Python's built-in HTML - parser make it good enough to serve as the default. - - If you install Beautiful Soup via a requirements.txt file and you - still want Beautiful Soup to use lxml as its parser (you probably - do), you should add 'lxml' to the list of requirements. - * Added a warning when you instantiate a BeautifulSoup object without explicitly naming a parser. [bug=1398866] diff --git a/prepare-release.sh b/prepare-release.sh index 864c5cf..d1956d8 100644 --- a/prepare-release.sh +++ b/prepare-release.sh @@ -4,6 +4,10 @@ # Recommend you run these steps one at a time rather than just running # the script. +# If you screwed up on the test server and have to create a "a" or "b" +# release the second time, add the '--pre' argument to pip install to +# find the 'prerelease'. + # Make sure tests pass ./test-all-versions @@ -22,6 +26,38 @@ source ../virtualenv-3/bin/activate python setup.py bdist_wheel deactivate +# Upload to pypi test +python setup.py register -r test +python setup.py sdist bdist_wheel upload -r test + +source ../virtualenv-3/bin/activate +python setup.py bdist_wheel upload -r test +deactivate + +# Try 2.x install from pypi test +rm -rf ../py2-install-test-virtualenv +virtualenv -p /usr/bin/python2.7 ../py2-install-test-virtualenv +source ../py2-install-test-virtualenv/bin/activate +pip install -i https://testpypi.python.org/pypi beautifulsoup4 +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>' +deactivate +rm -rf ../py2-install-test-virtualenv + +# Try 3.x install from pypi test +rm -rf ../py3-install-test-virtualenv +virtualenv -p /usr/bin/python3 ../py3-install-test-virtualenv +source ../py3-install-test-virtualenv/bin/activate +pip install -i https://testpypi.python.org/pypi beautifulsoup4 +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>' +deactivate +rm -rf ../py3-install-test-virtualenv + + + # Make sure setup.py works on 2.x rm -rf ../py2-install-test-virtualenv virtualenv -p /usr/bin/python2.7 ../py2-install-test-virtualenv @@ -68,3 +104,8 @@ echo "EXPECT HTML ON LINE BELOW" # That should print '<html><head></head><body><a>foo</a></body></html>' deactivate rm -rf ../py3-install-test-virtualenv + + + + +pip install -i https://testpypi.python.org/pypi beautifulsoup4 @@ -10,10 +10,10 @@ setup( author_email='leonardr@segfault.org', url="http://www.crummy.com/software/BeautifulSoup/bs4/", download_url = "http://www.crummy.com/software/BeautifulSoup/bs4/download/", + description="Screen-scraping library", long_description="""Beautiful Soup sits atop an HTML or XML parser, providing Pythonic idioms for iterating, searching, and modifying the parse tree.""", license="MIT", packages=find_packages(exclude=['tests*']), - install_requires = ['lxml'], extras_require = { 'lxml' : [ 'lxml'], 'html5lib' : ['html5lib'], |