-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes to use f-strings instead of format (#14)
- Loading branch information
1 parent
8569298
commit 3dffcb7
Showing
14 changed files
with
85 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
docutils | ||
Markdown | ||
recommonmark | ||
sphinx >= 4.1.0 | ||
sphinx >= 4.1.0, < 5.2.0 | ||
sphinx-markdown-tables | ||
sphinx-rtd-theme >= 0.5.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[metadata] | ||
license_file = LICENSE | ||
license_files = LICENSE | ||
|
||
[bdist_rpm] | ||
release = 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,10 +23,9 @@ | |
bdist_rpm = None | ||
|
||
version_tuple = (sys.version_info[0], sys.version_info[1]) | ||
if version_tuple < (3, 6): | ||
print(( | ||
'Unsupported Python version: {0:s}, version 3.6 or higher ' | ||
'required.').format(sys.version)) | ||
if version_tuple < (3, 7): | ||
print(f'Unsupported Python version: {sys.version:s}, version 3.7 or higher ' | ||
f'required.') | ||
sys.exit(1) | ||
|
||
# Change PYTHONPATH to include artifactsrc so that we can get the version. | ||
|
@@ -83,8 +82,8 @@ def _make_spec_file(self): | |
summary = line[9:] | ||
|
||
elif line.startswith('BuildRequires: '): | ||
line = 'BuildRequires: {0:s}-setuptools, {0:s}-devel'.format( | ||
python_package) | ||
line = (f'BuildRequires: {python_package:s}-setuptools, ' | ||
f'{python_package:s}-devel') | ||
|
||
elif line.startswith('Requires: '): | ||
requires = line[10:] | ||
|
@@ -113,7 +112,7 @@ def _make_spec_file(self): | |
'%doc ACKNOWLEDGEMENTS AUTHORS README', | ||
'%{_datadir}/%{name}/*', | ||
'', | ||
'%files -n {0:s}-%{{name}}'.format(python_package), | ||
f'%files -n {python_package:s}-%{{name}}', | ||
'%defattr(644,root,root,755)', | ||
'%license LICENSE', | ||
'%doc ACKNOWLEDGEMENTS AUTHORS README'] | ||
|
@@ -134,30 +133,27 @@ def _make_spec_file(self): | |
|
||
python_spec_file.extend([ | ||
'%package -n %{name}-data', | ||
'Summary: Data files for {0:s}'.format(summary), | ||
f'Summary: Data files for {summary:s}', | ||
'', | ||
'%description -n %{name}-data']) | ||
|
||
python_spec_file.extend(description) | ||
|
||
python_spec_file.append( | ||
'%package -n {0:s}-%{{name}}'.format(python_package)) | ||
python_summary = 'Python 3 module of {0:s}'.format(summary) | ||
python_spec_file.append(f'%package -n {python_package:s}-%{{name}}') | ||
python_summary = f'Python 3 module of {summary:s}' | ||
|
||
python_spec_file.extend([ | ||
'Requires: artifacts-kb-data >= %{{version}} {0:s}'.format( | ||
requires), | ||
'Summary: {0:s}'.format(python_summary), | ||
f'Requires: artifacts-kb-data >= %{{version}} {requires:s}', | ||
f'Summary: {python_summary:s}', | ||
'', | ||
'%description -n {0:s}-%{{name}}'.format(python_package)]) | ||
f'%description -n {python_package:s}-%{{name}}']) | ||
|
||
python_spec_file.extend(description) | ||
|
||
python_spec_file.extend([ | ||
'%package -n %{name}-tools', | ||
'Requires: {0:s}-artifacts-kb >= %{{version}}'.format( | ||
python_package), | ||
'Summary: Tools for {0:s}'.format(summary), | ||
f'Requires: {python_package:s}-artifacts-kb >= %{{version}}', | ||
f'Summary: Tools for {summary:s}', | ||
'', | ||
'%description -n %{name}-tools']) | ||
|
||
|
@@ -212,18 +208,23 @@ def parse_requirements_from_file(path): | |
artifactsrc_long_description = ( | ||
'Documentation accompanying the Digital Forensics Artifact Repository.') | ||
|
||
command_classes = {} | ||
if BdistMSICommand: | ||
command_classes['bdist_msi'] = BdistMSICommand | ||
if BdistRPMCommand: | ||
command_classes['bdist_rpm'] = BdistRPMCommand | ||
|
||
setup( | ||
name='artifactsrc', | ||
version=artifactsrc.__version__, | ||
description=artifactsrc_description, | ||
long_description=artifactsrc_long_description, | ||
long_description_content_type='text/plain', | ||
license='Apache License, Version 2.0', | ||
url='https://github.com/ForensicArtifacts/artifacts-kb', | ||
maintainer='Joachim Metz', | ||
maintainer_email='[email protected]', | ||
cmdclass={ | ||
'bdist_msi': BdistMSICommand, | ||
'bdist_rpm': BdistRPMCommand}, | ||
cmdclass=command_classes, | ||
classifiers=[ | ||
'Development Status :: 3 - Alpha', | ||
'Environment :: Console', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.