Skip to content

Commit

Permalink
Applied updates and moved docs CI tests to separate action
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Oct 21, 2022
1 parent ba16092 commit 8771083
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 7 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/test_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Run docs tox tests on Ubuntu Docker images using GIFT PPA
name: test_docs
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- python-version: '3.8'
toxenv: 'docs'
container:
image: ubuntu:20.04
steps:
- uses: actions/checkout@v2
- name: Set up container
env:
DEBIAN_FRONTEND: noninteractive
run: |
apt-get update -q
apt-get install -y libterm-readline-gnu-perl locales software-properties-common
locale-gen en_US.UTF-8
ln -f -s /usr/share/zoneinfo/UTC /etc/localtime
- name: Install dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
add-apt-repository -y universe
add-apt-repository -y ppa:deadsnakes/ppa
add-apt-repository -y ppa:gift/dev
apt-get update -q
apt-get install -y build-essential git libffi-dev python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv libbde-python3 libcreg-python3 libewf-python3 libfsapfs-python3 libfsext-python3 libfshfs-python3 libfsntfs-python3 libfsxfs-python3 libfvde-python3 libfwnt-python3 libfwsi-python3 libluksde-python3 libmodi-python3 libphdi-python3 libqcow-python3 libregf-python3 libsigscan-python3 libsmdev-python3 libsmraw-python3 libvhdi-python3 libvmdk-python3 libvsgpt-python3 libvshadow-python3 libvslvm-python3 python3-artifacts python3-cffi-backend python3-cryptography python3-dfdatetime python3-dfimagetools python3-dfvfs python3-dfwinreg python3-distutils python3-dtfabric python3-idna python3-mock python3-pbr python3-pip python3-pytsk3 python3-pyxattr python3-setuptools python3-six python3-yaml
- name: Install tox
run: |
python3 -m pip install tox
- name: Run tests
env:
LANG: en_US.UTF-8
run: |
tox -e${{ matrix.toxenv }}
2 changes: 0 additions & 2 deletions .github/workflows/test_tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ jobs:
toxenv: 'py310'
- python-version: '3.8'
toxenv: 'pylint'
- python-version: '3.8'
toxenv: 'docs'
container:
image: ubuntu:20.04
steps:
Expand Down
12 changes: 10 additions & 2 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Acknowledgements: winreg-kb
# Names should be added to this file with this pattern:
#
# For individuals:
# Name (email address)
#
# For organizations:
# Organization (fnmatch pattern)
#
# See python fnmatch module documentation for more information.

Copyright (c) 2013-2016, Joachim Metz <joachim.metz@gmail.com>
Joachim Metz (joachim.metz@gmail.com)
19 changes: 16 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,16 +136,24 @@ def _make_spec_file(self):
'%package -n {0:s}-%{{name}}'.format(python_package))
python_summary = 'Python 3 module of {0:s}'.format(summary)

if requires:
python_spec_file.append('Requires: {0:s}'.format(requires))

python_spec_file.extend([
'Requires: {0:s}'.format(requires),
'Summary: {0:s}'.format(python_summary),
'',
'%description -n {0:s}-%{{name}}'.format(python_package)])

python_spec_file.extend(description)

python_spec_file.extend([
'%package -n %{name}-tools',
'Requires: {0:s}-winreg-kb >= %{{version}}'.format(
python_package),
'Summary: Tools for {0:s}'.format(summary),
'',
'%description -n %{name}-tools'])

python_spec_file.extend(description)

elif in_description:
# Ignore leading white lines in the description.
if not description and not line:
Expand All @@ -155,6 +163,11 @@ def _make_spec_file(self):

python_spec_file.append(line)

python_spec_file.extend([
'',
'%files -n %{name}-tools',
'%{_bindir}/*.py'])

return python_spec_file


Expand Down

0 comments on commit 8771083

Please sign in to comment.