diff --git a/setup.py b/setup.py index bec96a047d11be32c97a89c49fa0f466f47bad69..6490d981d21f2bc42230c50c29303372db9f60be 100644 --- a/setup.py +++ b/setup.py @@ -50,58 +50,6 @@ except ImportError: DistributionMetadata.templates = None -class fill_template(Command): - """ - Custom distutils command to fill text templates with release meta data. - """ - - description = "Fill placeholders in documentation text file templates" - - user_options = [ - ('templates=', None, "Template text files to fill") - ] - - def initialize_options(self): - self.templates = '' - self.template_ext = '.in' - - def finalize_options(self): - if isinstance(self.templates, str): - self.templates = split_quoted(self.templates) - - self.templates += getattr(self.distribution.metadata, 'templates', None) or [] - - for tmpl in self.templates: - if not tmpl.endswith(self.template_ext): - raise ValueError( - "Template file '%s' does not have expected " + - "extension '%s'." % (tmpl, self.template_ext)) - - def run(self): - metadata = self.get_metadata() - - for infilename in self.templates: - try: - info("Reading template '%s'...", infilename) - with open(infilename) as infile: - tmpl = Template(infile.read()) - outfilename = infilename.rstrip(self.template_ext) - - info("Writing filled template to '%s'.", outfilename) - with open(outfilename, 'w') as outfile: - outfile.write(tmpl.safe_substitute(metadata)) - except: - error("Could not open template '%s'.", infilename) - - def get_metadata(self): - data = dict() - for attr in self.distribution.metadata.__dict__: - if not callable(attr): - data[attr] = getattr(self.distribution.metadata, attr) - - return data - - class compile_all_catalogs(Command): """ This is implementation of command which complies all catalogs @@ -269,11 +217,9 @@ setup( cmdclass={ 'build': build, 'compile_all_catalogs': compile_all_catalogs, - 'filltmpl': fill_template, 'build_less': build_less, 'tox': tox, }, - templates=['sonar-project.properties.in'], install_requires=install_requires, # required packages for build process setup_requires=[ diff --git a/sonar-project.properties.in b/sonar-project.properties.in deleted file mode 100644 index 67a4e0b999c6231c4f1444cdc3dd16c817515645..0000000000000000000000000000000000000000 --- a/sonar-project.properties.in +++ /dev/null @@ -1,17 +0,0 @@ -# project identification -sonar.projectKey=${name} -sonar.projectName=${name} -sonar.projectVersion=${version} - -# Location of the source code -sonar.sources=rdiffweb - -# Source code encoding -sonar.sourceEncoding=UTF-8 - -# Provide unitests report -sonar.python.xunit.reportPath=nosetests.xml -sonar.python.coverage.reportPath=coverage.xml - -# Excludes -sonar.exclusions=**/static/** \ No newline at end of file