Mercurial > p > roundup > code
diff roundup/dist/command/build.py @ 6647:42bf0a707763
issue2551183 - Replace references to distutils in roundup/dist/command
First pass at fixing this. Seems to work in:
native install
virtual env
python 2.7 and 3.6. Also docker python 3. Could use more testing
though.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Thu, 28 Apr 2022 18:10:10 -0400 |
| parents | f2fade4552c5 |
| children | 1acdc651133b |
line wrap: on
line diff
--- a/roundup/dist/command/build.py Thu Apr 28 18:03:02 2022 -0400 +++ b/roundup/dist/command/build.py Thu Apr 28 18:10:10 2022 -0400 @@ -5,7 +5,11 @@ # from __future__ import print_function from roundup import msgfmt -from distutils.command.build import build as base +try: + from setuptool.command.install import install as base + raise ImportError +except ImportError: + from distutils.command.build import build as base import os from glob import glob @@ -24,10 +28,11 @@ """Check that the files listed in the MANIFEST are present when the source is unpacked. """ + manifest_file = 'roundup.egg-info/SOURCES.txt' try: - f = open('MANIFEST') + f=open(manifest_file) except: - print('\n*** SOURCE WARNING: The MANIFEST file is missing!') + print('\n*** SOURCE WARNING: The MANIFEST file "%s" is missing!' % manifest_file) return try: manifest = [l.strip() for l in f.readlines()]
