python3 rpm macros not available without python3-devel installed. 'rpmbuild --viewrc' will show you.
So if you use the python3 macros to define another macro and you have no python3-devel installed, you must fail.
So, how to define, for example, a %py3_ver macro for the major version of Python3? Must yum be used?
Robin
On Wed, 2010-09-15 at 18:22 +0800, Robin Lee wrote:
python3 rpm macros not available without python3-devel installed. 'rpmbuild --viewrc' will show you.
So if you use the python3 macros to define another macro and you have no python3-devel installed, you must fail.
So, how to define, for example, a %py3_ver macro for the major version of Python3? Must yum be used?
Robin
Adding a "BuildRequires: python3-devel" should be enough to pull them in.
For a more concrete example: https://bugzilla.redhat.com/show_bug.cgi?id=567348 I want to set the python(abi) requirement of the subpackage at buildtime. So, I want to set it like this: Requires: python(abi) = %{py3_ver}
But when build it, it will fail with the following output: $ rpmbuild -bp dreampie.spec Building target platforms: i686 Building for target i686 sh: python3: command not found sh: python3: command not found sh: python3: command not found error: line 46: Version required: Requires: python(abi) =
Even though python3-devel has been added as BR.
On Wed, Sep 15, 2010 at 7:06 PM, Ignacio Vazquez-Abrams < ivazqueznet@gmail.com> wrote:
On Wed, 2010-09-15 at 18:22 +0800, Robin Lee wrote:
python3 rpm macros not available without python3-devel installed. 'rpmbuild --viewrc' will show you.
So if you use the python3 macros to define another macro and you have no python3-devel installed, you must fail.
So, how to define, for example, a %py3_ver macro for the major version of Python3? Must yum be used?
Robin
Adding a "BuildRequires: python3-devel" should be enough to pull them in.
-- Ignacio Vazquez-Abrams ivazqueznet@gmail.com
python-devel mailing list python-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/python-devel
You should build this package in a clean root like a mock environment. If you have python3-devel already installed and then run rpmbuild --rebuild, you will not see the issue.
On Wed, Sep 15, 2010 at 7:25 PM, Robin Lee robinlee.sysu@gmail.com wrote:
For a more concrete example: https://bugzilla.redhat.com/show_bug.cgi?id=567348 I want to set the python(abi) requirement of the subpackage at buildtime. So, I want to set it like this: Requires: python(abi) = %{py3_ver}
But when build it, it will fail with the following output: $ rpmbuild -bp dreampie.spec Building target platforms: i686 Building for target i686 sh: python3: command not found sh: python3: command not found sh: python3: command not found error: line 46: Version required: Requires: python(abi) =
Even though python3-devel has been added as BR.
On Wed, Sep 15, 2010 at 7:06 PM, Ignacio Vazquez-Abrams < ivazqueznet@gmail.com> wrote:
On Wed, 2010-09-15 at 18:22 +0800, Robin Lee wrote:
python3 rpm macros not available without python3-devel installed. 'rpmbuild --viewrc' will show you.
So if you use the python3 macros to define another macro and you have no python3-devel installed, you must fail.
So, how to define, for example, a %py3_ver macro for the major version of Python3? Must yum be used?
Robin
Adding a "BuildRequires: python3-devel" should be enough to pull them in.
-- Ignacio Vazquez-Abrams ivazqueznet@gmail.com
python-devel mailing list python-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/python-devel
I suspect I haven't had enough coffee yet, but I don't see the problem here. Why not simply add "python3-devel" as a build requirement as Ignacio says?
If a build requirement isn't installed, it's acceptable for a build to fail: it's a violation of a precondition.
On Wed, 2010-09-15 at 19:35 +0800, Robin Lee wrote:
You should build this package in a clean root like a mock environment. If you have python3-devel already installed and then run rpmbuild --rebuild, you will not see the issue.
On Wed, Sep 15, 2010 at 7:25 PM, Robin Lee robinlee.sysu@gmail.com wrote: For a more concrete example: https://bugzilla.redhat.com/show_bug.cgi?id=567348 I want to set the python(abi) requirement of the subpackage at buildtime. So, I want to set it like this: Requires: python(abi) = %{py3_ver}
But when build it, it will fail with the following output: $ rpmbuild -bp dreampie.spec Building target platforms: i686 Building for target i686 sh: python3: command not found sh: python3: command not found sh: python3: command not found error: line 46: Version required: Requires: python(abi) = Even though python3-devel has been added as BR. On Wed, Sep 15, 2010 at 7:06 PM, Ignacio Vazquez-Abrams <ivazqueznet@gmail.com> wrote: On Wed, 2010-09-15 at 18:22 +0800, Robin Lee wrote: > python3 rpm macros not available without python3-devel installed. > 'rpmbuild --viewrc' will show you. > > So if you use the python3 macros to define another macro and you have > no python3-devel installed, you must fail. > > So, how to define, for example, a %py3_ver macro for the major version > of Python3? Must yum be used? > > Robin Adding a "BuildRequires: python3-devel" should be enough to pull them in. -- Ignacio Vazquez-Abrams <ivazqueznet@gmail.com>
The main issue is failing to use a macro defined with %__python3 to specify the version of a requirement.
The recipe is sth like this:
%global py3_ver %(echo `%{__python3} -c "import sys; sys.stdout.write(sys.version[:3])"`)
.......
Requires: python(abi) = %{py3_ver}
On Wed, Sep 15, 2010 at 10:32 PM, David Malcolm dmalcolm@redhat.com wrote:
I suspect I haven't had enough coffee yet, but I don't see the problem here. Why not simply add "python3-devel" as a build requirement as Ignacio says?
If a build requirement isn't installed, it's acceptable for a build to fail: it's a violation of a precondition.
On Wed, 2010-09-15 at 19:35 +0800, Robin Lee wrote:
You should build this package in a clean root like a mock environment. If you have python3-devel already installed and then run rpmbuild --rebuild, you will not see the issue.
On Wed, Sep 15, 2010 at 7:25 PM, Robin Lee robinlee.sysu@gmail.com wrote: For a more concrete example: https://bugzilla.redhat.com/show_bug.cgi?id=567348 I want to set the python(abi) requirement of the subpackage at buildtime. So, I want to set it like this: Requires: python(abi) = %{py3_ver}
But when build it, it will fail with the following output: $ rpmbuild -bp dreampie.spec Building target platforms: i686 Building for target i686 sh: python3: command not found sh: python3: command not found sh: python3: command not found error: line 46: Version required: Requires: python(abi) = Even though python3-devel has been added as BR. On Wed, Sep 15, 2010 at 7:06 PM, Ignacio Vazquez-Abrams <ivazqueznet@gmail.com> wrote: On Wed, 2010-09-15 at 18:22 +0800, Robin Lee wrote: > python3 rpm macros not available without python3-devel installed. > 'rpmbuild --viewrc' will show you. > > So if you use the python3 macros to define another macro and you have > no python3-devel installed, you must fail. > > So, how to define, for example, a %py3_ver macro for the major version > of Python3? Must yum be used? > > Robin Adding a "BuildRequires: python3-devel" should be enough to pull them in. -- Ignacio Vazquez-Abrams <ivazqueznet@gmail.com>
python-devel mailing list python-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/python-devel
Oh, sorry. I may have chosen a bad email subject.
This failed scratch build shows what was happening: https://koji.fedoraproject.org/koji/taskinfo?taskID=2468876
On Wed, Sep 15, 2010 at 11:07 PM, Robin Lee robinlee.sysu@gmail.com wrote:
The main issue is failing to use a macro defined with %__python3 to specify the version of a requirement.
The recipe is sth like this:
%global py3_ver %(echo `%{__python3} -c "import sys;
sys.stdout.write(sys.version[:3])"`)
.......
Requires: python(abi) = %{py3_ver}
On Wed, Sep 15, 2010 at 10:32 PM, David Malcolm dmalcolm@redhat.comwrote:
I suspect I haven't had enough coffee yet, but I don't see the problem here. Why not simply add "python3-devel" as a build requirement as Ignacio says?
If a build requirement isn't installed, it's acceptable for a build to fail: it's a violation of a precondition.
On Wed, 2010-09-15 at 19:35 +0800, Robin Lee wrote:
You should build this package in a clean root like a mock environment. If you have python3-devel already installed and then run rpmbuild --rebuild, you will not see the issue.
On Wed, Sep 15, 2010 at 7:25 PM, Robin Lee robinlee.sysu@gmail.com wrote: For a more concrete example: https://bugzilla.redhat.com/show_bug.cgi?id=567348 I want to set the python(abi) requirement of the subpackage at buildtime. So, I want to set it like this: Requires: python(abi) = %{py3_ver}
But when build it, it will fail with the following output: $ rpmbuild -bp dreampie.spec Building target platforms: i686 Building for target i686 sh: python3: command not found sh: python3: command not found sh: python3: command not found error: line 46: Version required: Requires: python(abi) = Even though python3-devel has been added as BR. On Wed, Sep 15, 2010 at 7:06 PM, Ignacio Vazquez-Abrams <ivazqueznet@gmail.com> wrote: On Wed, 2010-09-15 at 18:22 +0800, Robin Lee wrote: > python3 rpm macros not available without python3-devel installed. > 'rpmbuild --viewrc' will show you. > > So if you use the python3 macros to define another macro and you have > no python3-devel installed, you must fail. > > So, how to define, for example, a %py3_ver macro for the major version > of Python3? Must yum be used? > > Robin Adding a "BuildRequires: python3-devel" should be enough to pull them in. -- Ignacio Vazquez-Abrams <ivazqueznet@gmail.com>
python-devel mailing list python-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/python-devel
On Wed, Sep 15, 2010 at 07:25:49PM +0800, Robin Lee wrote:
For a more concrete example: https://bugzilla.redhat.com/show_bug.cgi?id=567348 I want to set the python(abi) requirement of the subpackage at buildtime. So, I want to set it like this: Requires: python(abi) = %{py3_ver}
But when build it, it will fail with the following output: $ rpmbuild -bp dreampie.spec Building target platforms: i686 Building for target i686 sh: python3: command not found sh: python3: command not found sh: python3: command not found error: line 46: Version required: Requires: python(abi) =
Even though python3-devel has been added as BR.
I think that where you're running into this problem is important. It's when koji is constructing the srpm, isn't it? at that stage, koji needs to parse the spec file and it's running into the "Requires foo =\n" and throwing that error.
I think that conditionally defining a py3_ver macro in the spec file will do what you wnat. That way, when the package is actually built, the python3-devel pakage will be present and your conditional will not set the macro. but when building the srpm and python3-devel is missing, it will.
Something like this: %{?!py3_ver: %global py3_ver 3.2}
would work. I'm not sure of the safest thing that we can use there and still not run into problems when building the srpm.
-Toshio
On Wed, Sep 15, 2010 at 7:06 PM, Ignacio Vazquez-Abrams ivazqueznet@gmail.com wrote:
On Wed, 2010-09-15 at 18:22 +0800, Robin Lee wrote: > python3 rpm macros not available without python3-devel installed. > 'rpmbuild --viewrc' will show you. > > So if you use the python3 macros to define another macro and you have > no python3-devel installed, you must fail. > > So, how to define, for example, a %py3_ver macro for the major version > of Python3? Must yum be used? > > Robin Adding a "BuildRequires: python3-devel" should be enough to pull them in. -- Ignacio Vazquez-Abrams <ivazqueznet@gmail.com> _______________________________________________ python-devel mailing list python-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/python-devel
python-devel mailing list python-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/python-devel
The main point I want to get is to set a proper python(abi) requirement at buildtime without using hard version number at all. %{?!py3_ver: %global py3_ver 3.2} Doing so of course will make the package built. But that uses a hard version number.
I now suggest the requester to make a phantom file to get what we want. See this patch: https://bugzilla.redhat.com/attachment.cgi?id=447458&action=diff
Robin
On Thu, Sep 16, 2010 at 12:17 AM, Toshio Kuratomi a.badger@gmail.comwrote:
On Wed, Sep 15, 2010 at 07:25:49PM +0800, Robin Lee wrote:
For a more concrete example:
https://bugzilla.redhat.com/show_bug.cgi?id=567348
I want to set the python(abi) requirement of the subpackage at buildtime.
So, I
want to set it like this: Requires: python(abi) = %{py3_ver}
But when build it, it will fail with the following output: $ rpmbuild -bp dreampie.spec Building target platforms: i686 Building for target i686 sh: python3: command not found sh: python3: command not found sh: python3: command not found error: line 46: Version required: Requires: python(abi) =
Even though python3-devel has been added as BR.
I think that where you're running into this problem is important. It's when koji is constructing the srpm, isn't it? at that stage, koji needs to parse the spec file and it's running into the "Requires foo =\n" and throwing that error.
I think that conditionally defining a py3_ver macro in the spec file will do what you wnat. That way, when the package is actually built, the python3-devel pakage will be present and your conditional will not set the macro. but when building the srpm and python3-devel is missing, it will.
Something like this: %{?!py3_ver: %global py3_ver 3.2}
would work. I'm not sure of the safest thing that we can use there and still not run into problems when building the srpm.
-Toshio
On Wed, Sep 15, 2010 at 7:06 PM, Ignacio Vazquez-Abrams <
ivazqueznet@gmail.com>
wrote:
On Wed, 2010-09-15 at 18:22 +0800, Robin Lee wrote: > python3 rpm macros not available without python3-devel installed. > 'rpmbuild --viewrc' will show you. > > So if you use the python3 macros to define another macro and you
have
> no python3-devel installed, you must fail. > > So, how to define, for example, a %py3_ver macro for the major
version
> of Python3? Must yum be used? > > Robin Adding a "BuildRequires: python3-devel" should be enough to pull them in. -- Ignacio Vazquez-Abrams <ivazqueznet@gmail.com> _______________________________________________ python-devel mailing list python-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/python-devel
python-devel mailing list python-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/python-devel
python-devel mailing list python-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/python-devel
On Thu, Sep 16, 2010 at 10:03:21AM +0800, Robin Lee wrote:
The main point I want to get is to set a proper python(abi) requirement at buildtime without using hard version number at all. %{?!py3_ver: %global py3_ver 3.2} Doing so of course will make the package built. But that uses a hard version number.
I now suggest the requester to make a phantom file to get what we want. See this patch: https://bugzilla.redhat.com/attachment.cgi?id=447458&action= diff
I'm sorry I'm not being clear. I thought that py3_ver was being set by the python3 macros but I see now that you have to define that in the spec file. I've added a more detailed comment in bugzilla, but the basic spec file code to do this more simply is:
# get python3 version %global py3_ver 0 %{?__python3: %global py3_ver %(%{__python3} -c "import sys; sys.stdout.write(sys.version[:3])")}
-Toshio
Robin
On Thu, Sep 16, 2010 at 12:17 AM, Toshio Kuratomi a.badger@gmail.com wrote:
On Wed, Sep 15, 2010 at 07:25:49PM +0800, Robin Lee wrote: > For a more concrete example: https://bugzilla.redhat.com/show_bug.cgi?id= 567348 > I want to set the python(abi) requirement of the subpackage at buildtime. So, I > want to set it like this: > Requires: python(abi) = %{py3_ver} > > But when build it, it will fail with the following output: > $ rpmbuild -bp dreampie.spec > Building target platforms: i686 > Building for target i686 > sh: python3: command not found > sh: python3: command not found > sh: python3: command not found > error: line 46: Version required: Requires: python(abi) = > > Even though python3-devel has been added as BR. > I think that where you're running into this problem is important. It's when koji is constructing the srpm, isn't it? at that stage, koji needs to parse the spec file and it's running into the "Requires foo =\n" and throwing that error. I think that conditionally defining a py3_ver macro in the spec file will do what you wnat. That way, when the package is actually built, the python3-devel pakage will be present and your conditional will not set the macro. but when building the srpm and python3-devel is missing, it will. Something like this: %{?!py3_ver: %global py3_ver 3.2} would work. I'm not sure of the safest thing that we can use there and still not run into problems when building the srpm. -Toshio > On Wed, Sep 15, 2010 at 7:06 PM, Ignacio Vazquez-Abrams < ivazqueznet@gmail.com> > wrote: > > On Wed, 2010-09-15 at 18:22 +0800, Robin Lee wrote: > > python3 rpm macros not available without python3-devel installed. > > 'rpmbuild --viewrc' will show you. > > > > So if you use the python3 macros to define another macro and you have > > no python3-devel installed, you must fail. > > > > So, how to define, for example, a %py3_ver macro for the major version > > of Python3? Must yum be used? > > > > Robin > > Adding a "BuildRequires: python3-devel" should be enough to pull them > in. > > -- > Ignacio Vazquez-Abrams <ivazqueznet@gmail.com> > > _______________________________________________ > python-devel mailing list > python-devel@lists.fedoraproject.org > https://admin.fedoraproject.org/mailman/listinfo/python-devel > > > _______________________________________________ > python-devel mailing list > python-devel@lists.fedoraproject.org > https://admin.fedoraproject.org/mailman/listinfo/python-devel _______________________________________________ python-devel mailing list python-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/python-devel
python-devel mailing list python-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/python-devel
Oh! Thank you! This works.
On Thu, Sep 16, 2010 at 12:07 PM, Toshio Kuratomi a.badger@gmail.comwrote:
On Thu, Sep 16, 2010 at 10:03:21AM +0800, Robin Lee wrote:
The main point I want to get is to set a proper python(abi) requirement
at
buildtime without using hard version number at all. %{?!py3_ver: %global py3_ver 3.2} Doing so of course will make the package built. But that uses a hard
version
number.
I now suggest the requester to make a phantom file to get what we want. See this patch:
https://bugzilla.redhat.com/attachment.cgi?id=447458&action=
diff
I'm sorry I'm not being clear. I thought that py3_ver was being set by the python3 macros but I see now that you have to define that in the spec file. I've added a more detailed comment in bugzilla, but the basic spec file code to do this more simply is:
# get python3 version %global py3_ver 0 %{?__python3: %global py3_ver %(%{__python3} -c "import sys; sys.stdout.write(sys.version[:3])")}
-Toshio
Robin
On Thu, Sep 16, 2010 at 12:17 AM, Toshio Kuratomi a.badger@gmail.com
wrote:
On Wed, Sep 15, 2010 at 07:25:49PM +0800, Robin Lee wrote: > For a more concrete example:
https://bugzilla.redhat.com/show_bug.cgi?id=
567348 > I want to set the python(abi) requirement of the subpackage at
buildtime.
So, I > want to set it like this: > Requires: python(abi) = %{py3_ver} > > But when build it, it will fail with the following output: > $ rpmbuild -bp dreampie.spec > Building target platforms: i686 > Building for target i686 > sh: python3: command not found > sh: python3: command not found > sh: python3: command not found > error: line 46: Version required: Requires: python(abi) = > > Even though python3-devel has been added as BR. > I think that where you're running into this problem is important.
It's
when koji is constructing the srpm, isn't it? at that stage, koji needs
to
parse the spec file and it's running into the "Requires foo =\n" and throwing that error. I think that conditionally defining a py3_ver macro in the spec file
will
do what you wnat. That way, when the package is actually built, the python3-devel pakage will be present and your conditional will not
set the
macro. but when building the srpm and python3-devel is missing, it
will.
Something like this: %{?!py3_ver: %global py3_ver 3.2} would work. I'm not sure of the safest thing that we can use there
and
still not run into problems when building the srpm. -Toshio > On Wed, Sep 15, 2010 at 7:06 PM, Ignacio Vazquez-Abrams < ivazqueznet@gmail.com> > wrote: > > On Wed, 2010-09-15 at 18:22 +0800, Robin Lee wrote: > > python3 rpm macros not available without python3-devel
installed.
> > 'rpmbuild --viewrc' will show you. > > > > So if you use the python3 macros to define another macro and
you
have > > no python3-devel installed, you must fail. > > > > So, how to define, for example, a %py3_ver macro for the
major
version > > of Python3? Must yum be used? > > > > Robin > > Adding a "BuildRequires: python3-devel" should be enough to
pull them
> in. > > -- > Ignacio Vazquez-Abrams <ivazqueznet@gmail.com> > > _______________________________________________ > python-devel mailing list > python-devel@lists.fedoraproject.org > https://admin.fedoraproject.org/mailman/listinfo/python-devel > > > _______________________________________________ > python-devel mailing list > python-devel@lists.fedoraproject.org > https://admin.fedoraproject.org/mailman/listinfo/python-devel _______________________________________________ python-devel mailing list python-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/python-devel
python-devel mailing list python-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/python-devel
python-devel mailing list python-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/python-devel
python-devel@lists.fedoraproject.org