Accepting request 755353 from home:TheBlackCat:branches:devel:languages:python:numeric

Modeling and fitting package for scientific data analysis

OBS-URL: https://build.opensuse.org/request/show/755353
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=1
This commit is contained in:
Todd R 2019-12-09 18:49:08 +00:00 committed by Git OBS Bridge
commit 58ba0f8406
6 changed files with 143 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.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
*.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

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

20
config_with_build.patch Normal file
View File

@ -0,0 +1,20 @@
From d9e14da1618c9ca29363fc7be4524fce5ef22ac3 Mon Sep 17 00:00:00 2001
From: Todd <toddrme2178@gmail.com>
Date: Mon, 9 Dec 2019 11:48:38 -0500
Subject: [PATCH] Also have the build command run configure
Downstream Linux packagers generally split build and install into separate steps.
---
setup.cfg | 1 +
1 file changed, 1 insertion(+)
diff --git a/setup.cfg b/setup.cfg
index 807c2e511..747b82fb8 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,4 +1,5 @@
[aliases]
+build = sherpa_config xspec_config build
build_ext = sherpa_config xspec_config build_ext
develop = sherpa_config xspec_config develop
install = sherpa_config xspec_config install

6
python-sherpa.changes Normal file
View File

@ -0,0 +1,6 @@
-------------------------------------------------------------------
Tue Jan 8 19:14:59 UTC 2019 - Todd R <toddrme2178@gmail.com>
- initial version
- Add config_with_build.patch to make build step work
From: https://github.com/sherpa/sherpa/pull/714

90
python-sherpa.spec Normal file
View File

@ -0,0 +1,90 @@
#
# spec file for package python-sherpa
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-sherpa
Version: 4.12.0
Release: 0
Summary: Modeling and fitting package for scientific data analysis
License: GPL-3.0-only
URL: https://github.com/sherpa/sherpa/
Source: https://github.com/sherpa/sherpa/archive/%{version}.tar.gz#/sherpa-%{version}.tar.gz
# PATCH-FIX-UPSTREAM config_with_build.patch -- https://github.com/sherpa/sherpa/pull/714
Patch0: config_with_build.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module numpy-devel}
BuildRequires: %{python_module setuptools}
BuildRequires: bison
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: gcc-fortran
BuildRequires: python-rpm-macros
Requires: python-numpy
Requires: python-six
ExcludeArch: %{ix86}
# SECTION test requirements
BuildRequires: %{python_module mock}
BuildRequires: %{python_module pytest >= 3.3}
BuildRequires: %{python_module pytest-xvfb}
BuildRequires: %{python_module six}
BuildRequires: xauth
BuildRequires: xorg-x11-server
# /SECTION
%python_subpackages
%description
Sherpa is the CIAO modeling and fitting application. It enables the
user to construct models from definitions and fit those models to
data, using a variety of statistics and optimization methods.
%prep
%setup -q -n sherpa-%{version}
%autopatch -p1
sed -i 's|#stk-location|stk-location|' setup.cfg
sed -i 's|#group-location|group-location|' setup.cfg
%build
%{python_expand sed -i 's|stk-location=.*|stk-location=build/%{_lib}/python%{$python_version}/site-packages/stk.so|' setup.cfg
sed -i 's|group-location=.*|group-location=build/%{_lib}/python%{$python_version}/site-packages/group.so|' setup.cfg
%{$python_build}
}
%install
%{python_expand sed -i 's|stk-location=.*|stk-location=build/%{_lib}/python%{$python_version}/site-packages/stk.so|' setup.cfg
sed -i 's|group-location=.*|group-location=build/%{_lib}/python%{$python_version}/site-packages/group.so|' setup.cfg
%{$python_install}
}
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
mv sherpa sherpa_temp
%python_expand ls -l %{buildroot}%{$python_sitearch}/sherpa/utils/
ls -l *build*/*/*/
%pytest_arch %{buildroot}%{$python_sitearch}/sherpa/
mv sherpa_temp sherpa
%files %{python_files}
%doc README.md
%license LICENSE
%python3_only %{_bindir}/sherpa_test
%python3_only %{_bindir}/sherpa_smoke
%{python_sitearch}/*
%changelog

3
sherpa-4.12.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:da70b4c7e5a71642ee5422af5a8e2e98bf420b67dbcd8ad35c02e144c125d424
size 11591113