mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-11 08:03:11 +00:00
configuration
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@178 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
f3779e683b
commit
08c9f2b158
1 changed files with 11 additions and 8 deletions
19
setup.py
19
setup.py
|
|
@ -130,16 +130,19 @@ class LCDistribution(Distribution):
|
|||
libraries=LinkCheckerConf.libraries)]
|
||||
|
||||
|
||||
def create_conf_file(self, dir, data=[]):
|
||||
def create_conf_file(self, directory, data=[]):
|
||||
data.insert(0, "# this file is automatically created by setup.py")
|
||||
filename = os.path.join(dir, self.config_file)
|
||||
data.append("name = %s" % `self.get_name()`)
|
||||
data.append("version = %s" % `self.get_version()`)
|
||||
data.append("author = %s" % `self.get_author()`)
|
||||
data.append("author_email = %s" % `self.get_author_email()`)
|
||||
data.append("url = %s" % `self.get_url()`)
|
||||
filename = os.path.join(directory, self.config_file)
|
||||
# add metadata
|
||||
metanames = dir(self.metadata) + \
|
||||
['fullname', 'contact', 'contact_email']
|
||||
for name in metanames:
|
||||
method = "get_" + name
|
||||
cmd = "%s = %s" % (name, `getattr(self.metadata, method)()`)
|
||||
data.append(cmd)
|
||||
util.execute(write_file, (filename, data),
|
||||
"creating %s" % filename, self.verbose >= 1, self.dry_run)
|
||||
"creating %s" % filename, self.verbose>=1, self.dry_run)
|
||||
|
||||
|
||||
setup (name = "LinkChecker",
|
||||
version = "1.2.6",
|
||||
|
|
|
|||
Loading…
Reference in a new issue