[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [scl.org] Question about generating RPMs that depend on SCLs (like python27)



On 07/16/2014 10:21 AM, Bohuslav Kabrda wrote:

------------------------------------------------------------------------

    Requires: %{scl_prefix_python}-scldevel

I'd also like to add a general notice about using this macro in a spec file if anybody is interested -- It is important to have the package python27-scldevel, which defines this macro, already installed at a time the spec file which uses the macro above is being parsed.

Thus, it is not enough to have BuildRequires: python27-scldevel in the same spec file where we want to use the macro.

The BuildRequires is usually in a meta package of another (depended) collection, which is then installed in the buildroot (which ensures the macro is defined at a time the spec file using it is being parsed).

Honza

                                                       ^^^^^^
    I think you are missing the "-"

Nope, %{scl_prefix_python} should expand to "python27-", e.g. if
defined, it should already contain the "-". Alan, where are your
packages coming from? We added the -scldevel packages to RHSCL 1.1
downstream and I can also see one on scl.org [1]. Are you using older
builds of python27 SCL, perhaps from RHSCL 1.0?

Slavek

[1] https://www.softwarecollections.org/repos/rhscl/python27/epel-6-x86_64/

    on RHEL at least - I see this:

    #yum info python27-scldevel
    Loaded plugins: langpacks, product-id, subscription-manager
    Available Packages
    Name        : python27-scldevel
    Arch        : x86_64
    Version     : 1.1
    Release     : 19.el7
    Size        : 5.5 k
    Repo        : rhel-workstation-rhscl-7-rpms/7Workstation/x86_64
    Summary     : Package shipping development files for python27
    License     : GPLv2+
    Description : Package shipping development files, especially usefull for
                 : development of packages depending on python27 Software
                 : Collection.


    On 07/16/2014 12:41 AM, Alan Robertson wrote:

        Similar issue with this line:
        Requires:       %{scl_prefix_python}scldevel

        There is no scldevel package, nor a python27-scldevel


        On 07/15/2014 10:29 PM, Alan Robertson wrote:

            So, I'm trying to take the page you pointed at seriously -
            so I added this line from that page:

            BuildRequires: scl-utils-build


            There is no such package.  What was intended here?


            On 07/15/2014 04:09 PM, Orion Poplawski wrote:

                On 07/15/2014 04:06 PM, Orion Poplawski wrote:

                    On 07/15/2014 03:55 PM, Alan Robertson wrote:

                        OK.  It was pointed out to me off-list that I
                        was comparing the wrong thing.
                        I should have been looking at python27-python.
                        Here's what that package shows:

                        bash-4.1# *rpm -q --provides python27-python*
                        python27-python-abi = 2.7
                        python27-python(abi) = 2.7
                        python27-Distutils
                        python27-python2 = 2.7.5
                        python27-python-sqlite = 2.3.2
                        python27-python-ctypes = 1.0.1
                        python27-python-hashlib = 20081120
                        python27-python-uuid = 1.31
                        python27-python-argparse = 2.7.5-7.el6.centos.alt
                        python27-python = 2.7.5-7.el6.centos.alt
                        python27-python(x86-64) = 2.7.5-7.el6.centos.alt
                        bash-4.1#

                        Either I'm failing to do something to appease
                        the automagical python-version
                        detection (which I have no idea how it figures
                        that out), or the property
                        names in python27-python should not have the
                        "python27-" prefix.

                        Anyone know which it is - and how to deal with it?

                        It seems to me like the attributes of the
                        provides should not be prefixed by
                        python27.  But I'm new to this SCL stuff...


                    FWIW - they "python(abi) = ##" requires is added by
                    /usr/lib/rpm/pythondeps.sh
                    as part of the standard rpm dependency generation.
                    So yes, for this to work
                    with the scl, either the scl needs to provide
                    "python(abi) = 2.7" or you will
                    need to disable the automatic requires generation or
                    filter out the
                    python(abi) line.

                    We're all new to this SCL stuff.... :)



                Here's the magic from
                https://access.redhat.com/documentation/en-US/Red_Hat_Developer_Toolset/2/html/Software_Collections_Guide/sect-Extending_the_python27_and_python33_Software_Collections.html


                # Similarly, override __python_requires for automatic
                dependency generator
                %global __python_requires %{%{scl_python}_python_requires}




            --
                 Alan Robertson<alanr unix sh>  - @OSSAlanR

            "Openness is the foundation and preservative of friendship...  Let me claim from you at all times your undisguised opinions." - William Wilberforce



            _______________________________________________
            SCLorg mailing list
            SCLorg redhat comhttps://www.redhat.com/mailman/listinfo/sclorg



        --
             Alan Robertson<alanr unix sh>  - @OSSAlanR

        "Openness is the foundation and preservative of friendship...  Let me claim from you at all times your undisguised opinions." - William Wilberforce



        _______________________________________________
        SCLorg mailing list
        SCLorg redhat comhttps://www.redhat.com/mailman/listinfo/sclorg



    _______________________________________________
    SCLorg mailing list
    SCLorg redhat com
    https://www.redhat.com/mailman/listinfo/sclorg




--
Regards,
Bohuslav "Slavek" Kabrda.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]