Remove test files with a no-nuclear license from the sources

This commit is contained in:
Petr Viktorin 2021-06-03 16:31:16 +02:00
parent 8e421d8422
commit b39a2b360d
4 changed files with 39 additions and 3 deletions

1
.gitignore vendored
View File

@ -12,3 +12,4 @@ Pygments-1.3.1.tar.gz
/Pygments-2.7.2.tar.gz
/Pygments-2.7.4.tar.gz
/Pygments-2.8.1.tar.gz
/Pygments-2.8.1-clean.tar.xz

26
get-clean-tarball.sh Executable file
View File

@ -0,0 +1,26 @@
#! /bin/bash -ex
# You can set the version as an argument to the script,
# default is taken from the specfile
if [ "$1" = "" ]; then
VERSION=$(
rpm -q --qf "%{VERSION}\n" --specfile python-pygments.spec | head -n1
)
else
VERSION=$1
fi
SRCURL=https://files.pythonhosted.org/packages/source/P/Pygments/Pygments-$VERSION.tar.gz
BADFILE=Pygments-$VERSION/tests/examplefiles/java/Intro.java
OUT=Pygments-$VERSION-clean.tar.xz
curl -L $SRCURL |
gunzip |
tar --delete $BADFILE --delete $BADFILE.output |
xz > $OUT
if tar tJf $OUT | grep 'Intro.java'; then
>&2 echo "Intro.java left in!"
mv $OUT $OUT.bad
exit 1
fi

View File

@ -4,12 +4,18 @@
Name: python-pygments
Version: 2.8.1
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Syntax highlighting engine written in Python
License: BSD
URL: https://pygments.org/
Source0: %{pypi_source Pygments %{version}}
# One of the examples cannot be distributed in Fedora SRPM, see:
# https://github.com/pygments/pygments/issues/1831
# To obtain a cleaned-up tarball, run:
# $ ./get-clean-tarball.sh
Source0: Pygments-%{version}-clean.tar.xz
Source1: get-clean-tarball.sh
BuildArch: noarch
@ -84,6 +90,9 @@ make test PYTHON=%{python3}
%endif
%changelog
* Thu Jun 03 2021 Petr Viktorin <pviktori@redhat.com> - 2.8.1-4
- Remove test files with a no-nuclear license from the sources
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 2.8.1-3
- Rebuilt for Python 3.10

View File

@ -1 +1 @@
SHA512 (Pygments-2.8.1.tar.gz) = 223835c78615207ad590d364ba9a0f4bc9b5815baa080e60b9b71ce7b8e1ebfcc7a292d2a2b1cd358c08d820fc89e02c4060876d37ee17fd9e2759c9a0dcc80c
SHA512 (Pygments-2.8.1-clean.tar.xz) = a0711c479c29fb94423e55e0b10ca55f38acce3e495af8677e5b13d292ed767223a419ae588cdbd8f0fc001b6290cf28aefd5bb88732eca08bf5aea3a4a13577