"""
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>
# 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
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
if __name__ == '__main__':
sys.exit(main())
-