File python-pyNastran.spec of Package python-pyNastran
#
# spec file for package python-pyNastran
#
# Copyright (c) 2017 SUSE LINUX Products 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 http://bugs.opensuse.org/
#
# Tests require files not included in source archive
%bcond_with tests
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pyNastran
Version: 0.8.0
Release: 0
Summary: Nastran BDF Reader/Writer, F06 Reader/Writer, OP2 Reader, OP4 Reader & GUI
License: LGPL-3.0
Group: Development/Languages/Python
Url: https://github.com/SteveDoyle2/pyNastran
Source: https://files.pythonhosted.org/packages/source/p/pyNastran/pyNastran-%{version}.zip
Source1: https://raw.githubusercontent.com/SteveDoyle2/pyNastran/v%{version}/LICENSE.md
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel >= 2.7.7}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module docopt >= 0.6.2}
BuildRequires: %{python_module numpy >= 1.9.2}
BuildRequires: %{python_module scipy >= 0.16.0}
BuildRequires: %{python_module six >= 1.9.0}
BuildRequires: unzip
Requires: python-docopt >= 0.6.2
Requires: python-numpy >= 1.9.2
Requires: python-scipy >= 0.16.0
Requires: python-six >= 1.9.0
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires(post): update-alternatives
Requires(preun): update-alternatives
%python_subpackages
%description
The pyNastran software interfaces to Nastran's complicated input and output files
and provides a simplified interface to read/edit/write the various files.
The BDF reader/editor/writer supports about 210 cards including coordinate systems.
Card objects have methods to access data such as Mass, Area, etc. The BDF writer
writes a small field formatted file, but makes full use of the 8-character Nastran
field. The OpenMDAO BDF parametrization syntax is also supported.
The OP2 reader supports static/transient/frequency results, which unless analyzing
random responses this won't be a problem. It also supports F06 Writing for most of
the objects. Results include: displacement, velocity, acceleration, temperature,
eigenvectors, eigenvalues, SPC forces, MPC forces, grid point forces, load vectors,
applied loads, strain energy, as well as stress and strain.
The F06 reader works for simple problems, but it's still preliminary. At this point,
you should just use the OP2 reader. It's faster, more robust, and supports more
results. The F06 reader is more used as a verification tool for the OP2 reader.
The Cython OP4 reader supports ASCII and binary dense matrices. The Python OP4 reader
supports ASCII and binary sparse and dense matrices.
%prep
%setup -q -n pyNastran-%{version}
cp %{SOURCE1} .
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/bdf
%python_clone -a %{buildroot}%{_bindir}/format_converter
%python_clone -a %{buildroot}%{_bindir}/pyNastranGUI
%python_clone -a %{buildroot}%{_bindir}/run_nastran_double_precision
# Remove test files
rm -rf %{buildroot}%{_bindir}/test_*
%post
%{python_install_alternative bdf format_converter run_nastran_double_precision}
%preun
%python_uninstall_alternative bdf
%if %{with tests}
%check
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
$python pyNastran/all_tests_no_gui.py
}
%endif
%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE.md
%python_alternative %{_bindir}/bdf
%python_alternative %{_bindir}/format_converter
%python_alternative %{_bindir}/pyNastranGUI
%python_alternative %{_bindir}/run_nastran_double_precision
%{python_sitelib}/pyNastran/
%{python_sitelib}/pyNastran-%{version}-py*.egg-info
%changelog