diff --git a/.python-xmlschema.metadata b/.python-xmlschema.metadata new file mode 100644 index 0000000..02788d0 --- /dev/null +++ b/.python-xmlschema.metadata @@ -0,0 +1 @@ +9000b18afad6565b82ab7ecea4ba478658bfba5d SOURCES/xmlschema-2.4.0.tar.gz diff --git a/SOURCES/.gitignore b/SOURCES/.gitignore new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/SOURCES/.gitignore diff --git a/SOURCES/365.patch b/SOURCES/365.patch new file mode 100644 index 0000000..4f9fc8b --- /dev/null +++ b/SOURCES/365.patch @@ -0,0 +1,29 @@ +From 0970da0ce7c92629c255be8db735903ae15e712b Mon Sep 17 00:00:00 2001 +From: Charalampos Stratakis +Date: Fri, 25 Aug 2023 21:57:50 +0200 +Subject: [PATCH] Skip a test case when no internet connection is available + +--- + tests/test_translations.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tests/test_translations.py b/tests/test_translations.py +index 3730b79..ef1fab5 100644 +--- a/tests/test_translations.py ++++ b/tests/test_translations.py +@@ -13,6 +13,7 @@ + import gettext + + from xmlschema import XMLSchema, translation ++from xmlschema.testing import SKIP_REMOTE_TESTS + + + class TestTranslations(unittest.TestCase): +@@ -107,6 +108,7 @@ def test_pl_translation(self): + finally: + translation._translation = None + ++ @unittest.skipIf(SKIP_REMOTE_TESTS, "Remote networks are not accessible.") + def test_pl_validation_translation(self): + xml_path = "tests//test_cases//translations//pl//tytul_wykonawczy_niekompletny.xml" + xsd_path = "tests//test_cases//translations//pl//tw-1(5)8e.xsd" diff --git a/SPECS/python-xmlschema.spec b/SPECS/python-xmlschema.spec new file mode 100644 index 0000000..f489ab2 --- /dev/null +++ b/SPECS/python-xmlschema.spec @@ -0,0 +1,140 @@ +%global pypi_name xmlschema +Name: python-%{pypi_name} +Version: 2.4.0 +Release: 3%{?dist} +Summary: A Python XML Schema validator and decoder + +License: MIT +URL: https://github.com/brunato/xmlschema +Source0: %{pypi_source} + +# Skip tests requiring an internet connection +Patch: 365.patch + +BuildArch: noarch +BuildRequires: python3-devel +BuildRequires: pyproject-rpm-macros + +%global _description %{expand: +The xmlschema library is an implementation of XML Schema for Python. + +This library arises from the needs of a solid Python layer for processing XML +Schema based files for MaX (Materials design at the Exascale) European project. +A significant problem is the encoding and the decoding of the XML data files +produced by different simulation software. Another important requirement is +the XML data validation, in order to put the produced data under control. +The lack of a suitable alternative for Python in the schema-based decoding +of XML data has led to build this library. Obviously this library can be +useful for other cases related to XML Schema based processing, not only for +the original scope.} + +%description %_description + + +%package -n python3-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} %_description + + +%prep +%autosetup -p1 -n %{pypi_name}-%{version} +sed -i 's/~=/>=/' setup.py tox.ini # https://bugzilla.redhat.com/show_bug.cgi?id=1758141 +sed -i 's/==/>=/' tox.ini # too strict test deps +sed -i '/memory_profiler/d' tox.ini # optional test dep, not packaged in Fedora, not worth testing +%py3_shebang_fix %{pypi_name} + +%generate_buildrequires +%pyproject_buildrequires -t + +%build +%pyproject_wheel + +%install +%pyproject_install + +%check +%tox + +%files -n python3-%{pypi_name} +%license LICENSE +%doc README.rst +%{python3_sitelib}/%{pypi_name}/ +%{python3_sitelib}/%{pypi_name}-%{version}.dist-info/ +%{_bindir}/xmlschema-json2xml +%{_bindir}/xmlschema-validate +%{_bindir}/xmlschema-xml2json + + +%changelog +* Fri Jan 26 2024 Fedora Release Engineering - 2.4.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 2.4.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Aug 25 2023 Charalampos Stratakis - 2.4.0-1 +- Update to 2.4.0 +- Fixes: rhbz#2121551 + +* Fri Jul 21 2023 Fedora Release Engineering - 2.0.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Jun 14 2023 Python Maint - 2.0.3-3 +- Rebuilt for Python 3.12 + +* Fri Jan 20 2023 Fedora Release Engineering - 2.0.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Thu Aug 11 2022 Tomáš Hrnčiar - 2.0.3-1 +- Update to 2.0.3 +- Fixes: rhbz#2022465 + +* Fri Jul 22 2022 Fedora Release Engineering - 1.7.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 1.7.0-3 +- Rebuilt for Python 3.11 + +* Fri Jan 21 2022 Fedora Release Engineering - 1.7.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Aug 18 2021 Charalampos Stratakis - 1.7.0-1 +- Update to 1.7.0 (#1989154) + +* Mon Jul 26 2021 Tomas Hrnciar - 1.6.4-1 +- Update to 1.6.4 + +* Fri Jul 23 2021 Fedora Release Engineering - 1.4.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Jun 02 2021 Python Maint - 1.4.2-2 +- Rebuilt for Python 3.10 + +* Thu Jan 28 11:17:16 CET 2021 Tomas Hrnciar - 1.4.2-1 +- Update to 1.4.2 + +* Wed Jan 27 2021 Fedora Release Engineering - 1.4.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Thu Jan 14 08:42:36 CET 2021 Tomas Hrnciar - 1.4.1-1 +- Update to 1.4.1 + +* Mon Sep 21 2020 Lumír Balhar - 1.0.18-5 +- Fix FTBFS by build-requiring python3-devel + +* Wed Jul 29 2020 Fedora Release Engineering - 1.0.18-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Sat May 23 2020 Miro Hrončok - 1.0.18-3 +- Rebuilt for Python 3.9 + +* Thu Jan 30 2020 Fedora Release Engineering - 1.0.18-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Dec 31 2019 Miro Hrončok - 1.0.18-1 +- Update to 1.0.18 + +* Tue Dec 17 2019 Miro Hrončok - 1.0.16-1 +- Initial package