From 9ce5b31c4accb8afdfc80d68cdbf0f67734d6226 Mon Sep 17 00:00:00 2001 From: John Kristensen Date: Mon, 29 Mar 2021 22:37:29 +1100 Subject: [PATCH 1/3] Use setuptools for source distribution (issue2550899) Use setuptools for source distribution as recommended by the Python Package User Guide[1]. [1] https://packaging.python.org/guides/tool-recommendations/#packaging-tool-recommendations --- RELEASE.txt | 26 ++++++++++++-------------- setup.py | 9 +-------- 2 files changed, 13 insertions(+), 22 deletions(-) diff --git a/RELEASE.txt b/RELEASE.txt index 8c66dade03..25a57e241d 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -49,10 +49,11 @@ Roundup release checklist: python setup.py build (sdist generation will fail if this isn't done) 8. Rebuild documentation in "share/doc/roundup/html" python setup.py build_doc -9. python setup.py sdist --manifest-only - (ignore the 'warning: no previously-included ...' lines) -10. Check the MANIFEST to make sure that any new files are included. - (use hg status --rev :tip to list changed +9. python setup.py sdist + (if you find sdist a little verbose, add "--quiet" to the end of the + command) +10. Check the roundup.egg-info/SOURCES.txt to make sure that any new files are + included. (use hg status --rev :tip to list changed added and removed files. Last release e.g. 1.5.1 where tip was what would become 1.6) E.G. @@ -65,21 +66,18 @@ Roundup release checklist: http://docs.python.org/2/distutils/sourcedist.html#manifest-template (Notes files for the website and issue tracker shouldn't be in the manifest.) -11. python setup.py sdist - (if you find sdist a little verbose, add "--quiet" to the end of the - command) -12. Unpack the new tarball created in dist/roundup-.tar.gz +11. Unpack the new tarball created in dist/roundup-.tar.gz file in /tmp then a) run tests using installed pytest run under python2 and python3. (python2 -m pytest test/; python3 -m pytest test/) b) demo.py with all available Python versions. -13. Assuming all is well tag the release in the version-control +12. Assuming all is well tag the release in the version-control system. a) hg tag 1.6.0 # use right version. Should create/commit a changeset b) hg push # update main repo c) hg sum # verify that the tag shows up -14. Upload source distribution to PyPI - requires you sign up for a +13. Upload source distribution to PyPI - requires you sign up for a pypi account and be added as a maintainer to roundup. Ask existing maintainer for access. python setup.py sdist upload --repository pypi --sign @@ -87,13 +85,13 @@ Roundup release checklist: time. If you are using python older than 2.7.13 you need a .pypirc shown below. URL has changed. If using 2.7.13 or newer, you can remove the "--repository pypi" option. -15. Send doc/announcement.txt to python-announce@python.org and +14. Send doc/announcement.txt to python-announce@python.org and roundup-users@lists.sourceforge.net and roundup-devel@lists.sourceforge.net -15b. Update entry on https://freshcode.club/projects/roundup-tracker -15c. Update entries for fossies by emailing announcement to +14b. Update entry on https://freshcode.club/projects/roundup-tracker +14c. Update entries for fossies by emailing announcement to announce@fossies.org -16. Refresh website. +15. Refresh website. website/README.txt https://www.roundup-tracker.org/ should state that the stable version is the one that you released. diff --git a/setup.py b/setup.py index dfeafb0064..da9dc218cb 100755 --- a/setup.py +++ b/setup.py @@ -26,14 +26,7 @@ from roundup.dist.command.build import build, list_message_files from roundup.dist.command.bdist_rpm import bdist_rpm from roundup.dist.command.install_lib import install_lib -# FIXME: setuptools breaks the --manifest-only option to setup.py and -# doesn't seem to generate a MANIFEST file. Since I'm not familiar with -# the way setuptools handles the files to include I'm commenting this -# for now -- Ralf Schlatterbeck -#try: -# from setuptools import setup -#except ImportError: -from distutils.core import setup +from setuptools import setup import sys, os from glob import glob -- 2.30.1