Compare commits

...
Sign in to create a new pull request.

7 commits

Author SHA1 Message Date
Benjamin A. Beasley
c816ef12b0 Update to 0.5.7 (close RHBZ#2262160) 2024-02-01 08:43:05 -05:00
Benjamin A. Beasley
73a12053bc Assert that %pyproject_files contains a license file 2024-02-01 08:43:03 -05:00
Benjamin A. Beasley
c81aa02054 Update to 0.5.6 (close RHBZ#2243258) 2023-10-11 15:36:54 -04:00
Benjamin A. Beasley
dcbe27394e Make the test data source archive mostly-reproducible
This should keep us from having to upload a fresh archive to the
lookaside cache for a new version when the data hasn’t actually
changed.
2023-10-11 15:36:48 -04:00
Benjamin A. Beasley
d86e99f412 Update to 0.5.5 (close RHBZ#2243111) 2023-10-10 22:02:47 -04:00
Benjamin A. Beasley
2242a65800 Add mandatory ExcludeArch bug link 2023-07-25 09:17:45 -04:00
Benjamin A. Beasley
13a8099fba Drop versioneer conditionals and let the dist-git branches diverge 2023-07-24 11:41:24 -04:00
4 changed files with 39 additions and 38 deletions

5
.gitignore vendored
View file

@ -2,3 +2,8 @@
/pyMapVBVD-0.5.3.tar.gz /pyMapVBVD-0.5.3.tar.gz
/pyMapVBVD-0.5.4.tar.gz /pyMapVBVD-0.5.4.tar.gz
/pyMapVBVD-0.5.4-test-data.tar.xz /pyMapVBVD-0.5.4-test-data.tar.xz
/pyMapVBVD-0.5.5.tar.gz
/pyMapVBVD-0.5.5-test-data.tar.xz
/pyMapVBVD-test-data.tar.xz
/pyMapVBVD-0.5.6.tar.gz
/pyMapVBVD-0.5.7.tar.gz

View file

@ -11,8 +11,13 @@ Usage: $1 VERSION
Generate a source archive containing the test data files for pyMapVBVD that are Generate a source archive containing the test data files for pyMapVBVD that are
tracked in git LFS and are not included in the default source archive. The tracked in git LFS and are not included in the default source archive. The
result will be named pyMapVBVD-\${VERSION}-test-data.tar.xz and will be written result will be named pyMapVBVD-test-data.tar.xz and will be written
into the current working directory. into the current working directory.
The script attempts to produce a reproducible archive to avoid uploading
near-duplicate archives to the lookaside cache when the test data does not
change from one version to the next. Accordingly, the top-level directory
pyMapVBVD-\${VERSION}/ is omitted from the archived paths.
EOF EOF
} }
@ -41,7 +46,7 @@ GITDIR="$(echo "${FORGEURL}" | sed -r 's@.*/@@')"
#SOURCE0="${FORGEURL}/archive/${VERSION}/pdfminer.six-${VERSION}.tar.gz" #SOURCE0="${FORGEURL}/archive/${VERSION}/pdfminer.six-${VERSION}.tar.gz"
#TARNAME="$(basename "${SOURCE0}")" #TARNAME="$(basename "${SOURCE0}")"
TARDIR="pyMapVBVD-${VERSION}" TARDIR="pyMapVBVD-${VERSION}"
NEWTAR="${TARDIR}-test-data.tar.xz" NEWTAR='pyMapVBVD-test-data.tar.xz'
SAVEDIR="${PWD}" SAVEDIR="${PWD}"
XDIR="$(mktemp -d)" XDIR="$(mktemp -d)"
@ -61,8 +66,20 @@ git lfs ls-files -n |
ln "${fn}" "${DESTDIR}/$(basename "${fn}")" ln "${fn}" "${DESTDIR}/$(basename "${fn}")"
done done
cd "${XDIR}" cd "${XDIR}/${TARDIR}"
tar -cv "${TARDIR}/" | xz -9e > "${NEWTAR}" # https://www.gnu.org/software/tar/manual/html_section/Reproducibility.html
# We discard mtimes entirely, since git doesnt store mtimes and they are just
# the time we did the git clone.
TZ=UTC LC_ALL=C tar \
--create --verbose \
--sort=name \
--format=posix \
--numeric-owner --owner=0 --group=0 \
--mode=go+u,go-w \
--pax-option='delete=atime,delete=ctime' \
--clamp-mtime --mtime='@0' \
. |
xz -9e > "${XDIR}/${NEWTAR}"
cd "${SAVEDIR}" cd "${SAVEDIR}"
mv -v "${XDIR}/${NEWTAR}" . mv -v "${XDIR}/${NEWTAR}" .

View file

@ -1,14 +1,5 @@
# In the releases mentioned in the expression, the system versioneer is too old
# for the generated _version.py to have the get_version() function, and too old
# for the License tag to be accurate. We must use the bundled, amalgamated
# versioneer.py to generate _version.py.
#
# Otherwise, we can use the system versioneer to generate _version.py, and can
# remove the bundled, amaglamated versioneer.py to indicate we arent using it.
%bcond bundled_versioneer %{expr:0%{?fc37} || 0%{?fc38} || 0%{?el9}}
Name: python-pymapvbvd Name: python-pymapvbvd
Version: 0.5.4 Version: 0.5.7
Release: %autorelease Release: %autorelease
Summary: Python twix file reader Summary: Python twix file reader
@ -19,19 +10,12 @@ License: MIT AND Unlicense
URL: https://github.com/wtclarke/pymapvbvd URL: https://github.com/wtclarke/pymapvbvd
Source0: %{pypi_source pyMapVBVD} Source0: %{pypi_source pyMapVBVD}
# Generated with Source2: ./get_test_data.sh %%{version} # Generated with Source2: ./get_test_data.sh %%{version}
Source1: pyMapVBVD-%{version}-test-data.tar.xz Source1: pyMapVBVD-test-data.tar.xz
Source2: get_test_data.sh Source2: get_test_data.sh
BuildArch: noarch BuildArch: noarch
# The library assumes that the host and the file format are both little-endian. # PyMapVBVD assumes the platform is little-endian
# The necessary patch would not be trivial. Queried upstream: # https://bugzilla.redhat.com/show_bug.cgi?id=2225518
#
# Big-endian host support?
# https://github.com/wtclarke/pymapvbvd/issues/35
#
# A bug will be filed blocking F-ExcludeArch-s390x, per
# https://docs.fedoraproject.org/en-US/packaging-guidelines/#_architecture_build_failures,
# once the package is imported.
ExcludeArch: s390x ExcludeArch: s390x
BuildRequires: python3-devel BuildRequires: python3-devel
@ -52,42 +36,38 @@ Summary: %{summary}
# The generated _version.py has the same license as python3dist(versioneer), # The generated _version.py has the same license as python3dist(versioneer),
# but we do not consider it to be bundled from Versioneer. # but we do not consider it to be bundled from Versioneer.
%if %{with bundled_versioneer} #
# The system versioneer is too old for the generated _version.py to have the
# get_version() function, and too old for the License tag to be accurate. We
# must use the bundled, amalgamated versioneer.py to generate _version.py.
#
# While versioneer.py is a bundled copy of python3dist(versioneer) = 0.28, it # While versioneer.py is a bundled copy of python3dist(versioneer) = 0.28, it
# is not included in the binary RPMs, so we still do not treat it as bundled, # is not included in the binary RPMs, so we still do not treat it as bundled,
# and there is no corresponding virtual Provides. # and there is no corresponding virtual Provides.
%endif
%description -n python3-pymapvbvd %{common_description} %description -n python3-pymapvbvd %{common_description}
%prep %prep
%autosetup -n pyMapVBVD-%{version} -p1 %autosetup -n pyMapVBVD-%{version} -p1
%setup -q -T -D -b 1 -n pyMapVBVD-%{version} %setup -q -T -D -a 1 -c -n pyMapVBVD-%{version}
%if %{without bundled_versioneer}
rm -v versioneer.py
%endif
%generate_buildrequires %generate_buildrequires
export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}' export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}'
%if %{with bundled_versioneer}
export PYTHONPATH="${PWD}" export PYTHONPATH="${PWD}"
%endif
%pyproject_buildrequires -x tests %pyproject_buildrequires -x tests
%build %build
export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}' export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}'
%if %{with bundled_versioneer}
export PYTHONPATH="${PWD}" export PYTHONPATH="${PWD}"
%endif
%pyproject_wheel %pyproject_wheel
%install %install
%pyproject_install %pyproject_install
%pyproject_save_files mapvbvd %pyproject_save_files -l mapvbvd
%check %check
@ -95,7 +75,6 @@ export PYTHONPATH="${PWD}"
%files -n python3-pymapvbvd -f %{pyproject_files} %files -n python3-pymapvbvd -f %{pyproject_files}
# pyproject_files handles LICENSE; verify with “rpm -qL -p …”
%doc README.md %doc README.md

View file

@ -1,2 +1,2 @@
SHA512 (pyMapVBVD-0.5.4.tar.gz) = 1512db1aa15dcac460b87f100ecd9539a274f6b740f4024aee283cbc7fe3a0f466accd01e76bc393492c0088a797adaa0ae158c58ee36310ff6b0bac1666fb30 SHA512 (pyMapVBVD-0.5.7.tar.gz) = 0efd2d12ec48ae7f825095edf440d14064cf0f1690ab7dee63f247a923d359f633d057086a1d3defd2bd1606dbba0d1fabe2f6360f3658d04c78f347b61771ce
SHA512 (pyMapVBVD-0.5.4-test-data.tar.xz) = c29bcd449fb39d2449a1c3e555d4d61f80bc09102156d2103366bad610fe70e3c0152e417899db4e51879faec61a6d087576332c16f82bb30eedc2296026bef6 SHA512 (pyMapVBVD-test-data.tar.xz) = e082c5c296c67d62dbfaa631a8507427ac74375902b2038bf5de58aed39f3ce71dd013318cb262d66bc3ab7bb0c560ea7228b52da09ed7361a0396b16e71b974