diff --git a/marshmallow-3.5.1.tar.gz b/marshmallow-3.5.1.tar.gz new file mode 100644 index 0000000..372c66a Binary files /dev/null and b/marshmallow-3.5.1.tar.gz differ diff --git a/ordered_set.patch b/ordered_set.patch new file mode 100644 index 0000000..aaf97fa --- /dev/null +++ b/ordered_set.patch @@ -0,0 +1,12 @@ +diff -Naur marshmallow-3.5.1.orig/src/marshmallow/schema.py marshmallow-3.5.1/src/marshmallow/schema.py +--- marshmallow-3.5.1.orig/src/marshmallow/schema.py 2020-03-05 14:01:01.000000000 +0100 ++++ marshmallow-3.5.1/src/marshmallow/schema.py 2020-03-24 12:40:24.617005030 +0100 +@@ -14,7 +14,7 @@ + from marshmallow import base, fields as ma_fields, class_registry, types + from marshmallow.error_store import ErrorStore + from marshmallow.exceptions import ValidationError, StringNotCollectionError +-from marshmallow.orderedset import OrderedSet ++from ordered_set import OrderedSet + from marshmallow.decorators import ( + POST_DUMP, + POST_LOAD, diff --git a/python-marshmallow.spec b/python-marshmallow.spec new file mode 100644 index 0000000..99738f0 --- /dev/null +++ b/python-marshmallow.spec @@ -0,0 +1,64 @@ +%global _docdir_fmt python-marshmallow +Name: python-marshmallow +Version: 3.5.1 +Release: 4 +Summary: Python library for converting complex datatypes to and from primitive types +License: MIT +URL: http://marshmallow.readthedocs.org/ +Source0: https://github.com/marshmallow-code/marshmallow/archive/%{version}/marshmallow-%{version}.tar.gz +Patch0000: ordered_set.patch +Patch0001: versionwarning-disable.patch +BuildArch: noarch + +%description %{_description} +arshmallow is a framework-agnostic library for converting complex datatypes, +such as objects, to and from primitive Python datatypes. + +%package help +Summary: Documentation for python-marshmallow +Provides: python3-marshmallow-doc = %{version} +Obsoletes: python3-marshmallow-doc < 2.8.0-1 +BuildRequires: python3-sphinx +%description help +Documentation for python-marshmallow. + +%package -n python3-marshmallow +Summary: %{summary} +%{?python_provide:%python_provide python3-marshmallow} +BuildRequires: python3-devel python3-setuptools python3-pytest python3-pytz +BuildRequires: python3-ordered-set python3-dateutil python3-simplejson +Requires: python3-ordered-set +Recommends: python3-dateutil python3-simplejson +%description -n python3-marshmallow %{_description} +Python 3 version. + +%prep +%autosetup -n marshmallow-%{version} -p1 +rm -f ./marshmallow/orderedset.py +sed -i -e "/sphinx_issues/d" docs/conf.py +sed -i -e "/donate_url/d" docs/conf.py + +%build +%{?with_python3:%py3_build} +sphinx-build -b html docs html + +%install +%{?with_python3:%py3_install} +rm -rf html/{.buildinfo,.doctrees} + +%check +%{?with_pythoN3:py.test-%{python3_version} -v} + +%files help +%license LICENSE +%doc html examples + +%files -n python3-marshmallow +%license LICENSE +%doc CHANGELOG.rst README.rst +%{python3_sitelib}/marshmallow/ +%{python3_sitelib}/marshmallow-*.egg-info/ + +%changelog +* Mon Jun 22 2020 huanghaitao - 3.5.1-4 +- package init diff --git a/versionwarning-disable.patch b/versionwarning-disable.patch new file mode 100644 index 0000000..2765150 --- /dev/null +++ b/versionwarning-disable.patch @@ -0,0 +1,40 @@ +diff -Naur marshmallow-3.5.1.orig/docs/conf.py marshmallow-3.5.1/docs/conf.py +--- marshmallow-3.5.1.orig/docs/conf.py 2020-03-05 14:01:01.000000000 +0100 ++++ marshmallow-3.5.1/docs/conf.py 2020-03-24 12:42:34.539237871 +0100 +@@ -14,7 +14,6 @@ + "sphinx.ext.viewcode", + "alabaster", + "sphinx_issues", +- "versionwarning.extension", + ] + + primary_domain = "py" +@@ -87,28 +86,3 @@ + "searchbox.html", + ], + } +- +-# sphinx-version-warning config +-versionwarning_messages = { +- "latest": ( +- "This document is for the development version. " +- 'For the stable version documentation, see here.' +- ), +- "stable": ( +- "This document is for the latest 3.x stable release. " +- 'For the 2.x documentation, see here.' +- ), +- "2.x-line": ( +- "This document is for the 2.x release branch. " +- 'For the 3.x documentation, see here.' +- ), +-} +-# Show warning at top of page +-versionwarning_body_selector = "div.document" +-# For debugging locally +-# versionwarning_project_version = 'latest' +- +- +-def setup(app): +- # https://docs.readthedocs.io/en/latest/guides/adding-custom-css.html +- app.add_stylesheet("css/versionwarning.css")