Skip to content

Commit

Permalink
Account for file renames and removes.
Browse files Browse the repository at this point in the history
With the restructuring, we removed LICENSE, and README was
renamed to README.rst.
  • Loading branch information
friedelwolff committed Jun 18, 2012
1 parent 58959b7 commit b16d758
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
sitepackages = packagesdir.replace(sys.prefix + os.sep, '')

infofiles = [(join(sitepackages, 'translate'),
[join('translate', filename) for filename in 'COPYING', 'LICENSE', 'README'])]
[join('translate', filename) for filename in 'COPYING', 'README.rst'])]
initfiles = [(join(sitepackages, 'translate'), [join('translate', '__init__.py')])]

subpackages = [
Expand Down Expand Up @@ -98,7 +98,7 @@ def addsubpackages(subpackages):
for subpackage in subpackages:
initfiles.append((join(sitepackages, 'translate', subpackage),
[join('translate', subpackage, '__init__.py')]))
for infofile in ('README', 'TODO'):
for infofile in ('README.rst', 'TODO'):
infopath = join('translate', subpackage, infofile)
if os.path.exists(infopath):
infofiles.append((join(sitepackages, 'translate', subpackage),
Expand Down Expand Up @@ -307,11 +307,8 @@ def buildinfolinks():
linkdir = shutil.copytree
basedir = os.path.abspath(os.curdir)
os.chdir("translate")
if os.path.exists("LICENSE") or os.path.islink("LICENSE"):
os.remove("LICENSE")
linkfile("COPYING", "LICENSE")
os.chdir(basedir)
for infofile in ["COPYING", "README", "LICENSE"]:
for infofile in ["COPYING", "README.rst"]:
if os.path.exists(infofile) or os.path.islink(infofile):
os.remove(infofile)
linkfile(os.path.join("translate", infofile), infofile)
Expand All @@ -322,7 +319,7 @@ def buildmanifest_in(file, scripts):
print >>file, "# MANIFEST.in: the below autogenerated by setup.py from translate %s" % translateversion
print >>file, "# things needed by translate setup.py to rebuild"
print >>file, "# informational files"
for infofile in ("README", "TODO", "COPYING", "LICENSE", "*.txt"):
for infofile in ("README.rst", "TODO", "COPYING", "*.txt"):
print >>file, "global-include %s" % infofile
print >>file, "# C programs"
print >>file, "global-include *.c"
Expand Down

0 comments on commit b16d758

Please sign in to comment.