FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Packaging

 
 
LinkBack Thread Tools
 
Old 05-03-2012, 07:34 PM
Kamal Ahmed
 
Default packaging python applications

I am trying to package a python application in rpm

Source1: http://pypi.python.org/packages/source/Z/ZSI/ZSI-2.0-rc3.tar.gz


%build

{__python} setup.py build

But i get an error:

/usr/bin/python: can't open file 'ZSI-2.0-rc3/setup.py': [Errno 2] No such file or directory

Thanks,
-Kamal.
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 
Old 05-03-2012, 07:39 PM
Michael Schwendt
 
Default packaging python applications

On Thu, 3 May 2012 12:34:51 -0700 (PDT), KA (Kamal) wrote:

> I am trying to package a python application in rpm
>
> Source1: http://pypi.python.org/packages/source/Z/ZSI/ZSI-2.0-rc3.tar.gz
>
>
> %build
>
> {__python} setup.py build
>
> But i get an error:
>
> /usr/bin/python: can't open file 'ZSI-2.0-rc3/setup.py': [Errno 2] No such file or directory
>

Try again with a proper %setup in %prep? Clearly there is a setup.py file
in the top-level directory of the extracted tarball, so I think you've
got your %setup usage wrong.

--
Fedora release 17 (Beefy Miracle) - Linux 3.3.4-1.fc17.x86_64
loadavg: 0.00 0.01 0.05
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 
Old 05-03-2012, 09:40 PM
Kamal Ahmed
 
Default packaging python applications

Could it be that RPM Does not support building multiple applications ?
I have a custom binary package, and since ZSI is a pre-requisite, i am trying to make XSI part of this RPM, so when the rpm is installed the dependency gets installed as well

From: Michael Schwendt <mschwendt@gmail.com>
To:
packaging@lists.fedoraproject.org
Sent: Thursday, May 3, 2012 3:39 PM
Subject: Re: [Fedora-packaging] packaging python applications


On Thu, 3 May 2012 12:34:51 -0700 (PDT), KA (Kamal) wrote:

> I am trying to package a python application in rpm
>
> Source1: http://pypi.python.org/packages/source/Z/ZSI/ZSI-2.0-rc3.tar.gz
>
>
> %build
>
> {__python} setup.py build
>
> But i get an error:
>
> /usr/bin/python: can't open file 'ZSI-2.0-rc3/setup.py': [Errno 2] No such file or directory
>

Try again with a proper %setup in %prep? Clearly there is a setup.py file
in the top-level directory of the extracted tarball, so I think you've
got your %setup usage wrong.

--
Fedora release 17 (Beefy Miracle) - Linux 3.3.4-1.fc17.x86_64
loadavg: 0.00 0.01 0.05
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging

--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 
Old 05-03-2012, 09:46 PM
Michael Schwendt
 
Default packaging python applications

On Thu, 3 May 2012 14:40:42 -0700 (PDT), KA (Kamal) wrote:

> Could it be that RPM Does not support building multiple applications ?
>
> I have a custom binary package, and since ZSI is a pre-requisite, i am trying to make XSI part of this RPM, so when the rpm is installed the dependency gets installed as well
>

Try to give more context rather than less, please. Take your time when
submitting questions.

There are a lot of knowledgable packagers on this list, but so far it's
very difficult to understand what you're trying to do and how and why.
Related to what you've written above, I have no idea what you refer to.

--
Fedora release 17 (Beefy Miracle) - Linux 3.3.4-1.fc17.x86_64
loadavg: 0.00 0.01 0.07
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 
Old 05-03-2012, 10:01 PM
Kamal Ahmed
 
Default packaging python applications

I apologize for the context. Here is what i am trying to do:
I have a Custom Application, that i managed to build RPM for.Now this application has some dependencies, like ZSI ( a Python Soap Framework )
what i am trying to do , is to package ZSI as part of the RPM.hence:
Source0: core-0.2.tar.gz
Source1: ZSI-2.1-a1.tar.gz

%prep
%setup -qn core
%setup -q -n ZSI-2.1-a1


%build
#make core hnb_oct
%{__make} core hnb_oct
#%{__python} setup.py build
%{__python} ZSI-2.1-a1/setup.py build

But i get error:
+ cd
ZSI-2.1-a1
/var/tmp/rpm-tmp.63811: line 47: cd: ZSI-2.1-a1: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.63811 (%prep)


1. is it possible to to build ZSI as part of this RPM ? I see that openssh does it by packaging client and server in one RPM.
2. I could not find any example that is close to what i am trying to do.

Thanks,
-Kamal.
From: Michael Schwendt <mschwendt@gmail.com>
To: packaging@lists.fedoraproject.org
Sent: Thursday, May 3, 2012 5:46 PM
Subject: Re: [Fedora-packaging] packaging python applications


On Thu, 3 May 2012 14:40:42 -0700 (PDT), KA (Kamal) wrote:

> Could it be that RPM Does not support building multiple applications ?
>
> I have a custom binary package, and since ZSI is a pre-requisite, i am trying to make XSI part of this RPM, so when the rpm is installed the dependency gets installed as well
>

Try to give more context rather than less, please. Take your time when
submitting questions.

There are a lot of knowledgable packagers on this list, but so far it's
very difficult to understand what you're trying to do and how and why.
Related to what you've written above, I have no idea what you refer to.

--
Fedora release 17 (Beefy Miracle) - Linux 3.3.4-1.fc17.x86_64
loadavg: 0.00 0.01 0.07
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging

--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 
Old 05-04-2012, 09:36 AM
Michael Schwendt
 
Default packaging python applications

On Thu, 3 May 2012 15:01:09 -0700 (PDT), KA (Kamal) wrote:

> I apologize for the context. Here is what i am trying to do:
>
> I have a Custom Application, that i managed to build RPM for.
> Now this application has some dependencies, like ZSI ( a Python Soap Framework )
>
> what i am trying to do , is to package ZSI as part of the RPM.

Unusual, but doable. The superior and preferred way would be to put ZSI
in separate RPM packages and add proper RPM dependencies to your
application package.

> hence:
>
> Source0: core-0.2.tar.gz
> Source1: ZSI-2.1-a1.tar.gz
>
>
> %prep
> %setup -qn core
> %setup -q -n ZSI-2.1-a1

Have you had a look at the rpmbuild output for this? That would be a good
exercise, because you would become more familiar with the %setup command
and the directory structure you will need to work with in the rest of your
spec file. As a hint, %setup can take options to extract multiple tarballs,
individuals tarballs, and it can also create a top-level directory (if you
need one, e.g. as a convenient root to include multiple extracted tarballs).

> %build
> #make core hnb_oct
> %{__make} core hnb_oct
> #%{__python} setup.py build
> %{__python} ZSI-2.1-a1/setup.py build
>
>
> But i get error:
>
> + cd ZSI-2.1-a1
> /var/tmp/rpm-tmp.63811: line 47: cd: ZSI-2.1-a1: No such file or directory
> error: Bad exit status from /var/tmp/rpm-tmp.63811 (%prep)

This output is severely truncated and gives not enough context. One cannot
see the beginning of the %build section processing, for example.

As above, your %build section must do whatever is necessary to work within
the directory structure you created in the %prep section. Depending on
what directory structure you create, it may be necessary to "cd" into
individual directories in %build and %install, for example. It's just
a matter of paying attention to the rpmbuild output, then think about it
and adjust the spec file accordingly.

> 1. is it possible to to build ZSI as part of this RPM ? I see that openssh does it by packaging client and server in one RPM.
>

Yes, it is possible to define multiple packages (aka sub-packages) in a
spec file.

> 2. I could not find any example that is close to what i am trying to do.

Thousands of Fedora packages build multiple packages from a single spec
file. Hundreds (if not thousands as well) extract multiple %{SOURCEx}
archives and handle the extracted build directories in %build and %install
as necessary. The Maximum RPM book is one source that explains "subpackages".

--
Fedora release 17 (Beefy Miracle) - Linux 3.3.4-3.fc17.x86_64
loadavg: 0.81 0.65 0.27
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 

Thread Tools




All times are GMT. The time now is 11:44 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org