mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-28 01:54:42 +00:00
Remove custom MANIFEST logic from setup.py
I don't like the extra MANIFEST file lying around. It clashes with the old distutils feature of having a MANIFEST file. I intend to replace this check with check-manifest.
This commit is contained in:
parent
6c8e88dae6
commit
6a2d247be1
1 changed files with 0 additions and 42 deletions
42
setup.py
42
setup.py
|
|
@ -19,7 +19,6 @@ Setup file for the distuils module.
|
|||
|
||||
It includes the following features:
|
||||
- creation and installation of configuration files with installation data
|
||||
- automatic MANIFEST.in check
|
||||
- automatic generation of .mo locale files
|
||||
- automatic permission setting on POSIX systems for installed files
|
||||
|
||||
|
|
@ -263,36 +262,6 @@ def list_message_files(package, suffix=".mo"):
|
|||
"share", "locale", localename, "LC_MESSAGES", domainname))
|
||||
|
||||
|
||||
def check_manifest():
|
||||
"""Snatched from roundup.sf.net.
|
||||
Check that the files listed in the MANIFEST are present when the
|
||||
source is unpacked."""
|
||||
try:
|
||||
f = open('MANIFEST')
|
||||
except Exception:
|
||||
print('\n*** SOURCE WARNING: The MANIFEST file is missing!')
|
||||
return
|
||||
try:
|
||||
manifest = [l.strip() for l in f.readlines() if not l.startswith('#')]
|
||||
finally:
|
||||
f.close()
|
||||
err = [line for line in manifest if not os.path.exists(line)]
|
||||
if err:
|
||||
n = len(manifest)
|
||||
print('\n*** SOURCE WARNING: There are files missing (%d/%d found)!' %
|
||||
(n - len(err), n))
|
||||
print('\nMissing: '.join(err))
|
||||
|
||||
|
||||
class MyBuild(build):
|
||||
"""Custom build command."""
|
||||
|
||||
def run(self):
|
||||
"""Check MANIFEST before building."""
|
||||
check_manifest()
|
||||
build.run(self)
|
||||
|
||||
|
||||
class MyClean(clean):
|
||||
"""Custom clean command."""
|
||||
|
||||
|
|
@ -308,15 +277,6 @@ class MyClean(clean):
|
|||
clean.run(self)
|
||||
|
||||
|
||||
class MySdist(sdist):
|
||||
"""Custom sdist command."""
|
||||
|
||||
def get_file_list(self):
|
||||
"""Add MANIFEST to the file list."""
|
||||
super(MySdist, self).get_file_list()
|
||||
self.filelist.append("MANIFEST")
|
||||
|
||||
|
||||
# scripts
|
||||
scripts = ['linkchecker']
|
||||
|
||||
|
|
@ -368,9 +328,7 @@ setup(
|
|||
cmdclass = {
|
||||
'install_lib': MyInstallLib,
|
||||
'install_data': MyInstallData,
|
||||
'build': MyBuild,
|
||||
'clean': MyClean,
|
||||
'sdist': MySdist,
|
||||
},
|
||||
packages = find_packages(include=["linkcheck", "linkcheck.*"]),
|
||||
scripts = scripts,
|
||||
|
|
|
|||
Loading…
Reference in a new issue