forked from pool/python-django-mptt
* "Since I unfortunately still depend on django-mptt in prehistoric projects I took it upon me to make it runnable again. This doesn't mean I want to maintain the package." * Added support for Python 3.12, Django 5.0. * Dropped Python < 3.9, Django < 3.2. * Added support for the Django admin theme switcher. * Switched to hatchling. * Fixed get_cached_trees if there are multiple trees in the queryset. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:django/python-django-mptt?expand=0&rev=6
68 lines
2.2 KiB
RPMSpec
68 lines
2.2 KiB
RPMSpec
#
|
|
# spec file for package python-django-mptt
|
|
#
|
|
# Copyright (c) 2024 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%{?sle15_python_module_pythons}
|
|
Name: python-django-mptt
|
|
Version: 0.16
|
|
Release: 0
|
|
Summary: Modified Preorder Tree Traversal for Django Models
|
|
License: MIT
|
|
URL: https://github.com/django-mptt/django-mptt
|
|
Source: https://github.com/django-mptt/django-mptt/archive/refs/tags/%{version}.tar.gz
|
|
BuildRequires: %{python_module hatchling}
|
|
BuildRequires: %{python_module pip}
|
|
BuildRequires: %{python_module wheel}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
Requires: python-Django >= 2.2
|
|
Requires: python-django-js-asset
|
|
BuildArch: noarch
|
|
# SECTION test requirements
|
|
BuildRequires: %{python_module Django >= 2.2}
|
|
BuildRequires: %{python_module django-js-asset}
|
|
BuildRequires: %{python_module model-bakery}
|
|
# /SECTION
|
|
%python_subpackages
|
|
|
|
%description
|
|
Utilities for implementing Modified Preorder Tree Traversal with your Django Models and working with trees of Model instances.
|
|
|
|
%prep
|
|
%setup -q -n django-mptt-%{version}
|
|
sed -i 's/from model_mommy import mommy/from model_bakery import baker as mommy/' tests/myapp/tests.py
|
|
sed -i 's/test_create_by_mommy_exception/_test_create_by_mommy_exception/' tests/myapp/tests.py
|
|
|
|
%build
|
|
%pyproject_wheel
|
|
|
|
%install
|
|
%pyproject_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
export PYTHONPATH=${PWD}
|
|
%python_expand $python tests/manage.py test -v2 --keepdb
|
|
|
|
%files %{python_files}
|
|
%doc README.rst
|
|
%license LICENSE
|
|
%{python_sitelib}/mptt/
|
|
%{python_sitelib}/django[-_]mptt*/
|
|
|
|
%changelog
|