ed68deb
%global commit e6314347519d97b06fd68d1fbdb9c3348009a4c2
1a24c3f
%global shorcommit %(c=%{commit}; echo ${c:0:7})
1a24c3f
a3bd316
%{!?__python2: %global __python2 %{__python}}
a3bd316
%global with_python3 1
a3bd316
a3bd316
############ General Information ############
1a24c3f
Name: ahkab
ed68deb
Version: 0.18
1cbca23
Release: 3%{?dist}
1a24c3f
Summary: A SPICE-like electronic circuit simulator written in Python
1a24c3f
Group: Applications/Engineering	
1a24c3f
License: GPLv2
1a24c3f
URL: http://ahkab.github.io/ahkab/
1a24c3f
Source0: https://github.com/ahkab/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz
1a24c3f
a3bd316
############ Dependencies ############
1a24c3f
BuildArch: noarch
1a24c3f
BuildRequires: python2-devel python-setuptools
a3bd316
a3bd316
%if 0%{?with_python3}
a3bd316
a3bd316
BuildRequires: python3-devel python3-setuptools
a3bd316
a3bd316
%endif # if with_python3
a3bd316
1a24c3f
Requires: sympy python-matplotlib numpy 
1a24c3f
Requires: python >= 2.6
1a24c3f
a3bd316
%if 0%{?with_python3}
a3bd316
%package -n python3-ahkab
a3bd316
a3bd316
Summary: A SPICE-like electronic circuit simulator written in Python
a3bd316
Group: Applications/Engineering	
a3bd316
Requires: python3-sympy
a3bd316
Requires: python3-matplotlib
a3bd316
Requires: python3-numpy
a3bd316
a3bd316
%endif # if with_python3
a3bd316
a3bd316
############ Description and Python3 Global Config ############
1a24c3f
%description
1a24c3f
A SPICE-like electronic circuit simulator written in Python.
1a24c3f
It can be used to do AC analysis, DC sweep, Transient analysis and more.
1a24c3f
a3bd316
%if 0%{?with_python3}
a3bd316
a3bd316
%description -n python3-ahkab
a3bd316
A SPICE-like electronic circuit simulator written in Python.
a3bd316
It can be used to do AC analysis, DC sweep, Transient analysis and more.
a3bd316
a3bd316
%endif # with_python3
a3bd316
a3bd316
############ Prep ############
1a24c3f
%prep
1a24c3f
%setup -q -n %{name}-%{commit}
a3bd316
find -name '*.py'  | xargs sed -i -e '/^#!\//, 1d'
a3bd316
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|'
1a24c3f
rm -rf ahkab.egg-info
a3bd316
a3bd316
%if 0%{?with_python3}
a3bd316
a3bd316
rm -rf %{py3dir}
a3bd316
cp -a . %{py3dir}
1a24c3f
find -name '*.py'  | xargs sed -i -e '/^#!\//, 1d'
a3bd316
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
1a24c3f
a3bd316
%endif # with_python3
a3bd316
a3bd316
############ Build ############
1a24c3f
%build
1a24c3f
%{__python2} setup.py build
1a24c3f
a3bd316
%if 0%{?with_python3}
a3bd316
a3bd316
pushd %{py3dir}
a3bd316
%{__python3} setup.py build
a3bd316
popd
a3bd316
a3bd316
%endif # with_python3
a3bd316
a3bd316
############ Install ############
1a24c3f
%install
a3bd316
a3bd316
%if 0%{?with_python3}
a3bd316
a3bd316
pushd %{py3dir}
a3bd316
%{__python3} setup.py install --skip-build --root %{buildroot}
a3bd316
popd
a3bd316
a3bd316
%endif # with_python3
a3bd316
1a24c3f
%{__python2} setup.py install --skip-build --root %{buildroot}
1a24c3f
a3bd316
############ Files ############
1a24c3f
%files
a9f0c54
%doc README.md COPYING
1a24c3f
%{python2_sitelib}/ahkab/
a9f0c54
%{python2_sitelib}/ahkab-*.egg-info
5d08069
%{_bindir}/ahkab
1a24c3f
a3bd316
%if 0%{?with_python3}
a3bd316
a3bd316
%files -n python3-ahkab
a3bd316
%doc README.md COPYING
a3bd316
%{python3_sitelib}/ahkab/
a3bd316
%{python3_sitelib}/ahkab-*.egg-info
a3bd316
a3bd316
%endif # with_python3
a3bd316
a3bd316
############ Changelog ############
1a24c3f
%changelog
1cbca23
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.18-3
1cbca23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
1cbca23
ff11de4
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.18-2
ff11de4
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
ff11de4
ed68deb
* Sat Jul 18 2015 Kiara Navarro <sophiekovalevsky@fedoraproject.org> - 0.18-1
ed68deb
- Bump to lastest version
ed68deb
- Add Four and Fft support
ed68deb
- Add PWL waveforms
ed68deb
dd8b354
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.17-2
dd8b354
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
dd8b354
0a66170
* Fri May 29 2015 Kiara Navarro <sophiekovalevsky@fedoraproject.org> - 0.16-1
0a66170
- Bump to lastest version
0a66170
- Implementation of memoization system
0a66170
- New time functions.
0a66170
- Replace my_time_function.value()
0a66170
1718423
* Tue May 12 2015 Kiara Navarro <sophiekovalevsky@fedoraproject.org> - 0.16-1
1718423
- Bump to latest version
1718423
a3bd316
* Fri Mar 13 2015 Kiara Navarro <sophiekovalevsky@fedoraproject.org> - 0.12-2
a3bd316
- Python 3 version created
a3bd316
b947582
* Sat Jan 31 2015 Kiara Navarro <sophiekovalevsky@fedoraproject.org> - 0.12-1
b947582
- Improving documentation.
b947582
- Fix detection of wd
b947582
- Use the warning interface
b947582
- Fix printing of .DC statements
b947582
762b9d1
* Wed Oct 22 2014 Kiara Navarro <sophiekovalevsky@fedoraproject.org> - 0.10-2
762b9d1
- Clean lines on spec file. 
762b9d1
5d08069
* Sat Oct 18 2014 Kiara Navarro <sophiekovalevsky@fedoraproject.org> - 0.10-1
5d08069
- Update release version and new source.
5d08069
a46ba13
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.09-4
a46ba13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
a46ba13
1a24c3f
* Fri Apr 18 2014 Kiara Navarro <sophiekovalevsky@fedoraproject.org> - 0.09-3
1a24c3f
- Change directory files to ahkab. 
1a24c3f
- Change spec file permission. 
1a24c3f
- Package egg info.
1a24c3f
- Remove shebang from python files.
1a24c3f
1a24c3f
1a24c3f
* Thu Apr 17 2014 Kiara Navarro <sophiekovalevsky@fedoraproject.org> - 0.09-2
1a24c3f
- Remove defattr macro. Add setuptools as BR. Remove BRoot line.
1a24c3f
1a24c3f
* Thu Apr 17 2014 Kiara Navarro <sophiekovalevsky@fedoraproject.org> - 0.09-1
1a24c3f
- Initial package
1a24c3f