[geneagrapher] 123/226: Adding missing files. I really need to improve the distribution mechanism to avoid making these mistakes.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Sat Jul 11 17:10:53 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository geneagrapher.
commit 99038d241d4d615ea5d6dcbc736e1749c034ae9a
Author: David Alber <alber.david at gmail.com>
Date: Sat Aug 29 16:51:28 2009 +0000
Adding missing files. I really need to improve the distribution mechanism to avoid making these mistakes.
---
licensify.py | 31 +++++++++++++++++++++++++++++++
makedist.py | 45 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 76 insertions(+)
diff --git a/licensify.py b/licensify.py
new file mode 100644
index 0000000..045b00a
--- /dev/null
+++ b/licensify.py
@@ -0,0 +1,31 @@
+"""This small tool copies the license text in the file defined in the
+'license' variable below to the top of each file defined in the
+'files' variable. The license is prepended by the comment character.
+
+This script is meant to be called before packaging."""
+
+def prependLicense(file, license):
+ res = ''
+
+ lin = open(license, 'r')
+ for line in lin:
+ res = '%s# %s' % (res, line)
+ lin.close()
+ res = '%s\n' % (res)
+
+ fin = open(file, 'r')
+ for line in fin:
+ res = '%s%s' % (res, line)
+
+ fin.close()
+ return res
+
+if __name__ == '__main__':
+ files = ['geneagrapher/GGraph.py', 'geneagrapher/geneagrapher.py',
+ 'geneagrapher/grab.py', 'geneagrapher/ggrapher.py']
+ license = 'COPYING'
+ for file in files:
+ res = prependLicense(file, license)
+ fout = open(file, "w")
+ fout.write(res)
+ fout.close()
diff --git a/makedist.py b/makedist.py
new file mode 100644
index 0000000..cbbf093
--- /dev/null
+++ b/makedist.py
@@ -0,0 +1,45 @@
+"""This tool sets up a distribution of the software by automating
+several tasks that need to be done.
+
+The directory should be in pristine condition when this is run (i.e.,
+devoid of files that need to be removed before packaging begins). It
+is best to run this on a fresh check out of the repository."""
+
+import os
+import licensify
+
+if __name__ == '__main__':
+ # "Licensify" the source files.
+ files = ['geneagrapher/GGraph.py', 'geneagrapher/geneagrapher.py',
+ 'geneagrapher/grab.py', 'geneagrapher/ggrapher.py']
+ license = 'COPYING'
+ for file in files:
+ res = licensify.prependLicense(file, license)
+ fout = open(file, "w")
+ fout.write(res)
+ fout.close()
+
+ # Remove files (including this one) that are not to be in the
+ # distribution.
+ os.system('svn rm licensify.py')
+ os.system('rm -f licensify.pyc')
+ os.system('svn rm makedist.py')
+ os.system('rm -f makedist.pyc')
+
+ # Make the distribution.
+ os.system('python setup.py sdist --format gztar,zip')
+
+ # Compute digests and signatures.
+ os.chdir('dist')
+ dirl = os.listdir('.')
+ for file in dirl:
+ comm = 'sha1sum %s > %s.sha1' % (file, file)
+ os.system(comm)
+
+ comm = 'gpg -abs %s' % (file)
+ os.system(comm)
+ os.chdir('..')
+
+ # Add files to repository.
+ os.system('svn add Geneagrapher.egg-info')
+ os.system('svn add dist')
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/geneagrapher.git
More information about the debian-science-commits
mailing list