On Thursday, October 17, 2019 10:58:42 AM CEST Miro Hrončok wrote:
> On 16. 10. 19 19:57, Christopher Beck wrote:
> 
> > Hi,
> > 
> > I am trying to build PyVISA (https://pyvisa.readthedocs.io/en/latest/)
> > using 
 mock and the problem is, during the build it is looking for
> > "/builddir/build/BUILDROOT/python-pyvisa-1.10.0-1.fc30.x86_64/usr/lib/pyth
> > on3.7/site-packages/pyvisa-1.10.0-py?.?.egg-info". 
 But the real name if
> > the directory
> > is"/builddir/build/BUILDROOT/python-pyvisa-1.10.0-1.fc30.x86_64/usr/lib/py
> > thon3.7/site-packages/PyVISA-1.10.0-py?.?.egg-info". 
 So I think the
> > developer was not aware of case sensitive systems. 
> > I tried to modify the specfile but with no different result. So original 
> > specfile was created using pyp2rpm.
> 
> 
> pyp2rpm is an automatic tool that creates a specfile that is not always
> perfect.
 Changing the specfile is the way to go. Could you please share
> the current one? 
> -- 
> Miro Hrončok
> --
> Phone: +420777974800
> IRC: mhroncok
> _______________________________________________
> python-devel mailing list -- python-devel@lists.fedoraproject.org
> To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
> Fedora Code of Conduct:
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List
> Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List
> Archives:
> https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproj
> ect.org

I used some like the one in the attachment. One modification was in line 70 as 
it can be seen here, to have the correct case-sensitive writing of PyVISA. 
Additionally I changed pypi_name and other stuff (at the end very desperate) 
all with the same result.
# Created by pyp2rpm-3.3.2
%global pypi_name pyvisa

Name:           python-%{pypi_name}
Version:        1.10.1
Release:        1%{?dist}
Summary:        Python VISA bindings for GPIB, RS232, TCPIP and USB instruments

License:        MIT License
URL:            https://github.com/pyvisa/pyvisa
Source0:        https://files.pythonhosted.org/packages/source/p/%{pypi_name}/PyVISA-%{version}.tar.gz
BuildArch:      noarch
 
BuildRequires:  python3-devel
BuildRequires:  python3dist(setuptools)
BuildRequires:  python3dist(sphinx)

%description
A Python package for support of the "Virtual Instrument Software Architecture"
(VISA), in order to control measurement devices and test equipment via GPIB,
RS232, Ethernet or USB. Description --The programming of measurement
instruments can be real pain. There are many different protocols, sent over
many different interfaces and bus systems (GPIB, RS232, USB). For every
programming language...

%package -n     python3-%{pypi_name}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
 
Requires:       python3dist(setuptools)
%description -n python3-%{pypi_name}
A Python package for support of the "Virtual Instrument Software Architecture"
(VISA), in order to control measurement devices and test equipment via GPIB,
RS232, Ethernet or USB. Description --The programming of measurement
instruments can be real pain. There are many different protocols, sent over
many different interfaces and bus systems (GPIB, RS232, USB). For every
programming language...

%package -n python-%{pypi_name}-doc
Summary:        pyvisa documentation
%description -n python-%{pypi_name}-doc
Documentation for pyvisa

%prep
%autosetup -n PyVISA-%{version}
# Remove bundled egg-info
rm -rf *.egg-info

%build
%py3_build
# generate html docs 
PYTHONPATH=${PWD} sphinx-build-3 docs/source html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}

%install
%py3_install

%check
%{__python3} setup.py test

%files -n python3-%{pypi_name}
%license LICENSE
%doc README.rst
%{_bindir}/pyvisa-info
%{_bindir}/pyvisa-shell
%{python3_sitelib}/__pycache__/*
%{python3_sitelib}/visa.py
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/PyVISA-%{version}-py?.?.egg-info

%files -n python-%{pypi_name}-doc
%doc html
%license LICENSE

%changelog
* Sun Oct 06 2019 Christopher Beck <bec...@beckus.eu> - 1.10.1-1
- Initial package.
_______________________________________________
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org

Reply via email to