Little fixes found during cnfvar-api-Review
[pyi2ncommon] / make_dist.py
index 849e6f5..a505124 100755 (executable)
@@ -3,7 +3,7 @@
 """
 Create source tarball, create rpm from it together with spec file.
 
-Create a source tarball that is compatbile with standard build pipelines. Then
+Create a source tarball that is compatible with standard build pipelines. Then
 run rpmbuild on it to create an installable rpm.
 
 .. codeauthor:: Intra2net AG <info@intra2net.com>
@@ -28,10 +28,11 @@ SOURCE_REGEX = re_compile(r'^Source0:\s*(\S+)\s*$')
 # dir to contain tarball
 DIST_DIR = join(BASE_DIR, 'dist')
 
-# files and dirs to add to tarball; keep in sync with %files secion in spec
+# files and dirs to add to tarball; keep in sync with %files section in spec
 DATA = (
     'COPYING.GPL', 'Linking-Exception.txt', 'README', 'CONTRIBUTING',
-    'setup.py', 'src', 'test', 'doc/about_docu.rst', 'doc/conf.py'
+    'setup.py', 'src', 'test', 'doc/about_docu.rst', 'doc/conf.py',
+    'doc/cnfvar-api-ascii-art.rst'
 )
 
 # dir where rpmbuild expects its tarballs
@@ -85,10 +86,10 @@ def create_tarball():
     name, version, tarball_file = get_spec_info()
     tarball_path = join(DIST_DIR, tarball_file)
     print(f'Creating {tarball_path}')
-    dirname = f'{name}-{version}'
+    dir_name = f'{name}-{version}'
     with tarfile.open(tarball_path, 'w:gz') as tarball:
         for entry in DATA:
-            tarball.add(entry, join(dirname, entry), filter=tar_add_filter)
+            tarball.add(entry, join(dir_name, entry), filter=tar_add_filter)
     return tarball_path
 
 
@@ -113,4 +114,3 @@ def main():
 
 if __name__ == '__main__':
     sys.exit(main())
-