From 1de10c847230f10bcd9a2178f06f91a70fd2006c32ef8fea20b2b78cf9cb8b33 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 8 Feb 2023 07:00:09 +0000 Subject: [PATCH] - Initial release of 3.22.1. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-ase?expand=0&rev=1 --- .gitattributes | 24 ++++++++++ .gitignore | 4 ++ ase-3.22.1.tar.gz | 3 ++ python-ase.changes | 4 ++ python-ase.spec | 87 +++++++++++++++++++++++++++++++++++++ support-matplotlib-36.patch | 37 ++++++++++++++++ 6 files changed, 159 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 ase-3.22.1.tar.gz create mode 100644 python-ase.changes create mode 100644 python-ase.spec create mode 100644 support-matplotlib-36.patch diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..37a8eaa --- /dev/null +++ b/.gitattributes @@ -0,0 +1,24 @@ +*.changes merge=merge-changes +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8b731c3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.obscpio +*.osc +_build.* +.pbuild diff --git a/ase-3.22.1.tar.gz b/ase-3.22.1.tar.gz new file mode 100644 index 0000000..e7ee22d --- /dev/null +++ b/ase-3.22.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:004df6b0ea04b1114c790fadfe45d4125eb0e53125c66a93425af853d82ab432 +size 2807134 diff --git a/python-ase.changes b/python-ase.changes new file mode 100644 index 0000000..4aea10f --- /dev/null +++ b/python-ase.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Wed Feb 8 06:56:05 UTC 2023 - Steve Kowalik + +- Initial release of 3.22.1. diff --git a/python-ase.spec b/python-ase.spec new file mode 100644 index 0000000..08ad3b4 --- /dev/null +++ b/python-ase.spec @@ -0,0 +1,87 @@ +# +# spec file for package python-ase +# +# Copyright (c) 2023 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/ +# + + +Name: python-ase +Version: 3.22.1 +Release: 0 +Summary: Atomic Simulation Environment +License: LGPL-2.1+ +URL: https://wiki.fysik.dtu.dk/ase +Source: https://files.pythonhosted.org/packages/source/a/ase/ase-%{version}.tar.gz +# PATCH-FIX-UPSTREAM https://gitlab.com/ase/ase/-/merge_requests/2826 +Patch0: support-matplotlib-36.patch +BuildRequires: python-rpm-macros +BuildRequires: %{python_module setuptools} +# SECTION test requirements +BuildRequires: %{python_module matplotlib >= 3.1.0} +BuildRequires: %{python_module numpy >= 1.15.0} +BuildRequires: %{python_module scipy >= 1.1.0} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module pytest-mock} +BuildRequires: %{python_module pytest-xdist} +BuildRequires: %{python_module tk} +# /SECTION +BuildRequires: fdupes +Requires: python-matplotlib >= 3.1.0 +Requires: python-numpy >= 1.15.0 +Requires: python-scipy >= 1.1.0 +BuildArch: noarch +%python_subpackages + +%description +Atomic Simulation Environment + +%prep +%autosetup -p1 -n ase-%{version} + +%build +%python_build + +%install +%python_install +%python_clone -a %{buildroot}%{_bindir}/ase +%python_clone -a %{buildroot}%{_bindir}/ase-db +%python_clone -a %{buildroot}%{_bindir}/ase-gui +%python_clone -a %{buildroot}%{_bindir}/ase-run +%python_clone -a %{buildroot}%{_bindir}/ase-info +%python_clone -a %{buildroot}%{_bindir}/ase-build +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +# No scipy CODATA +%pytest -k 'not test_units' + +%post +%python_install_alternative ase ase-db ase-gui ase-run ase-info ase-build + +%postun +%python_uninstall_alternative ase + +%files %{python_files} +%doc CHANGELOG.rst README.rst +%license COPYING COPYING.LESSER LICENSE +%python_alternative %{_bindir}/ase +%python_alternative %{_bindir}/ase-db +%python_alternative %{_bindir}/ase-gui +%python_alternative %{_bindir}/ase-run +%python_alternative %{_bindir}/ase-info +%python_alternative %{_bindir}/ase-build +%{python_sitelib}/ase +%{python_sitelib}/ase*info + +%changelog diff --git a/support-matplotlib-36.patch b/support-matplotlib-36.patch new file mode 100644 index 0000000..95e4627 --- /dev/null +++ b/support-matplotlib-36.patch @@ -0,0 +1,37 @@ +From 3d4fff328ba9a06d9799563f357cfe5968f1f79c Mon Sep 17 00:00:00 2001 +From: Ask Hjorth Larsen +Date: Mon, 16 Jan 2023 16:41:15 +0100 +Subject: [PATCH] set window title in way that will not crash on matplotlib + 3.6+ + +--- + ase/cli/band_structure.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/ase/cli/band_structure.py b/ase/cli/band_structure.py +index 303c64b88..603ad659a 100644 +--- a/ase/cli/band_structure.py ++++ b/ase/cli/band_structure.py +@@ -16,15 +16,17 @@ def read_band_structure(filename): + + def main(args, parser): + import matplotlib.pyplot as plt ++ + bs = read_band_structure(args.calculation) + emin, emax = (float(e) for e in args.range) +- fig = plt.gcf() +- fig.canvas.set_window_title(args.calculation) ++ fig = plt.figure(args.calculation) + ax = fig.gca() ++ + bs.plot(ax=ax, + filename=args.output, + emin=emin + bs.reference, + emax=emax + bs.reference) ++ + if args.output is None: + plt.show() + +-- +GitLab +