Mailinglist Archive: opensuse-packaging (127 mails)

< Previous Next >
[opensuse-packaging] Re: Creating meta-packages for python2/3 from a single spec
Hi Jan!

On 08/21/2017 01:02 PM, jan matejek wrote:
On 18.8.2017 17:11, John Paul Adrian Glaubitz wrote:
I tried using this technique for the meta-package as well. However, that didn't
work
because python-rpm-macros expects a setup.py to be present which, of course, I
don't> have in an effectively empty package.

no, python-rpm-macros don't expect setup.py, they don't ever touch it unless
you use %python_build

That's odd. I basically took the current version of my package [1], commented
out the Source directives and the %python_build directives and it fails with:

what error are you seeing? what you are trying to do looks valid and should
work with singlespec
as is.

[ 19s] + /usr/bin/python2 setup.py build '--executable=/usr/bin/python2 -s'
[ 19s] /usr/bin/python2: can't open file 'setup.py': [Errno 2] No such file
or directory
[ 19s] error: Bad exit status from /var/tmp/rpm-tmp.f17BNP (%build)

I'm attaching a diff with the changes I made, then ran "osc build".

Adrian

[1]
https://build.opensuse.org/package/show/Cloud:Tools:azuresdkbreak/python-azure-sdk
Index: python-azure-sdk.spec
===================================================================
--- python-azure-sdk.spec (revision 194700736005f345eb14da771d463ebd)
+++ python-azure-sdk.spec (working copy)
@@ -24,13 +24,13 @@
License: MIT
Group: Development/Languages/Python
Url: https://github.com/Azure/azure-sdk-for-python
-Source:
https://files.pythonhosted.org/packages/source/a/azure/azure-2.0.0.zip
-Source1: LICENSE.txt
-Patch1: a_drop-compatible-releases-operator.patch
+#Source:
https://files.pythonhosted.org/packages/source/a/azure/azure-2.0.0.zip
+#Source1: LICENSE.txt
+#Patch1: a_drop-compatible-releases-operator.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
-BuildRequires: unzip
+#BuildRequires: unzip
Requires: python-azure-batch < 4.0.0
Requires: python-azure-batch >= 3.0.0
Requires: python-azure-datalake-store < 1.0.0
@@ -64,19 +64,19 @@
All packages in this bundle have been tested with Python 2.7, 3.3, 3.4, 3.5
and 3.6.

%prep
-%setup -q -n azure-2.0.0
-%patch1 -p1
+#%setup -q -n azure-2.0.0
+#%patch1 -p1

%build
-install -m 644 %{SOURCE1} %{_builddir}/azure-2.0.0
-%python_build
+#install -m 644 %{SOURCE1} %{_builddir}/azure-2.0.0
+#%python_build

%install
-%python_install
+#%python_install

-%files %{python_files}
-%defattr(-,root,root,-)
-%doc LICENSE.txt README.rst
-%{python_sitelib}/*
+#%files #%{python_files}
+#%defattr(-,root,root,-)
+#%doc LICENSE.txt README.rst
+#%{python_sitelib}/*

%changelog

< Previous Next >
Follow Ups