[opensuse-packaging] python singlespec: wiki page
Hello all, I have created a page on the openSUSE wiki, listing the conversion steps and explaining some things. I will try to keep it up to date with new developments. This also supersedes the "how to convert your package" e-mail. https://en.opensuse.org/openSUSE:Packaging_Python_Singlespec Also, at some point the content should be merged into Packaging:Python, but this turned out to be a bigger task :) So for now I'll place a link to it and leave it at that. Please let me know if you think that something should be added, removed, changed, etc. Also it would be nice if someone could look at the CSS for the wiki, and ensure that <code> and <pre> tags are more readable -- for me, the monospace font is about half the size of the regular font. regards m.
Hi, On Tuesday, 7 March 2017 16:34:34 CET jan matejek wrote:
I have created a page on the openSUSE wiki, listing the conversion steps and explaining some things. I will try to keep it up to date with new developments.
This also supersedes the "how to convert your package" e-mail.
https://en.opensuse.org/openSUSE:Packaging_Python_Singlespec
Also, at some point the content should be merged into Packaging:Python, but this turned out to be a bigger task :) So for now I'll place a link to it and leave it at that.
your effort is very much appreciated. Thank you. How about just including all your content from that page on top of the existing page? IMHO it is way easier to merge the page content when the content is already on the right page. Otherwise people might even have problems finding both pages.
Also it would be nice if someone could look at the CSS for the wiki, and ensure that <code> and <pre> tags are more readable -- for me, the monospace font is about half the size of the regular font.
Looks good to me. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Tuesday, 7 March 2017 16:34:34 CET jan matejek wrote:
Please let me know if you think that something should be added, removed, changed, etc.
I recommend to have a full example of a spec file referenced, e.g. as you did in the email thread to https://build.opensuse.org/package/view_file/ devel:languages:python:singlespec/python-bottle/python-bottle.spec?expand=1 -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On 7.3.2017 16:48, Oliver Kurz wrote:
On Tuesday, 7 March 2017 16:34:34 CET jan matejek wrote:
Please let me know if you think that something should be added, removed, changed, etc.
I recommend to have a full example of a spec file referenced, e.g. as you did in the email thread to https://build.opensuse.org/package/view_file/ devel:languages:python:singlespec/python-bottle/python-bottle.spec?expand=1
thanks for the suggestion, i have now added a couple of links to full spec files -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Tue, Mar 7, 2017 at 10:34 AM, jan matejek
Hello all,
I have created a page on the openSUSE wiki, listing the conversion steps and explaining some things. I will try to keep it up to date with new developments.
This also supersedes the "how to convert your package" e-mail.
https://en.opensuse.org/openSUSE:Packaging_Python_Singlespec
Also, at some point the content should be merged into Packaging:Python, but this turned out to be a bigger task :) So for now I'll place a link to it and leave it at that.
Please let me know if you think that something should be added, removed, changed, etc.
Also it would be nice if someone could look at the CSS for the wiki, and ensure that <code> and <pre> tags are more readable -- for me, the monospace font is about half the size of the regular font.
regards m.
There are some things that I feel are still ambiguous here: 1. Does the renaming in, for example, Requires, only rename packages that begin with "python-" or does it rename packages with "python-" appearing anywhere? So would "Require: foo-python-bar" be renamed? What about with more complex expressions, such as "packageand(python-foo:%{bar})"? 2. What about "Supplements"? Are python packages in that tag renamed automatically? 3. What if we need to BuildRequires the entire python interpreter, rather than python-base or python-devel? Would we just "BuildRequires: python" and "BuildRequires: python3", or is there a macro to handle that? If there is no macro, is "BuildRequires: python" or "BuildRequires: python2" preferable? What if we need to Requires the entire python interpreter? -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
hello, On 8.3.2017 19:00, Todd Rme wrote:
There are some things that I feel are still ambiguous here:
thanks for the suggestions. I'm updating the wiki with answers.
1. Does the renaming in, for example, Requires, only rename packages that begin with "python-" or does it rename packages with "python-" appearing anywhere? So would "Require: foo-python-bar" be renamed?
No. Do you think it should?
What about with more complex expressions, such as "packageand(python-foo:%{bar})"?
I wrote packageand() support yesterday, after toying with your python-gobject package :) I completely forgot that this existed. The intention is to rename "package names starting with python-" (or "$flavor-"), so this should leave out "foo-python-bar" but should affect expressions that include python names. Once we adopt Fedora's pythonX.Ydist(), this will also be supported. I am only aware of packageand(), are there similar expressions that should be supported?
2. What about "Supplements"? Are python packages in that tag renamed automatically?
yes, as of yesterday :)
3. What if we need to BuildRequires the entire python interpreter, rather than python-base or python-devel? Would we just "BuildRequires: python" and "BuildRequires: python3", or is there a macro to handle that? If there is no macro, is "BuildRequires: python" or "BuildRequires: python2" preferable? What if we need to Requires the entire python interpreter?
There is no BuildRequires macro support for this. I'm considering creating a "python-full-stdlib" symbol which you would then put into %python_module, but that doesn't exist yet. BuildRequiring "python" should be exceptional, so I'm OK with listing the pythons manually. "python2" is the preferred name. (but as of right now I'm unsure whether it works in Leap < 42.3 -- it depends on whether they get the python update that is now headed to SLE) "Requires: python" works fine and gets renamed to the appropriate interpreter. regards m.
On Thu, Mar 9, 2017 at 7:52 AM, jan matejek
hello,
On 8.3.2017 19:00, Todd Rme wrote:
There are some things that I feel are still ambiguous here:
thanks for the suggestions. I'm updating the wiki with answers.
1. Does the renaming in, for example, Requires, only rename packages that begin with "python-" or does it rename packages with "python-" appearing anywhere? So would "Require: foo-python-bar" be renamed?
No. Do you think it should?
No, I don't. In particular, it will be a problem with packages whose pypi name is foo-python, and has subpackages. You will end up with, say, python-foo-python-bar being renamed to python2-foo-python2-bar, which is not what we want. You could make it so it only does packages that have python- later in the name but don't start with "python-", but then the rules are getting too complicated. There are other corner cases that would also need their own rules, like "foopython-bar", for example. I think keeping the rules simple avoids having to deal with these sorts of corner cases. But I do think it should be documented.
What about with more complex expressions, such as "packageand(python-foo:%{bar})"?
I wrote packageand() support yesterday, after toying with your python-gobject package :) I completely forgot that this existed.
The intention is to rename "package names starting with python-" (or "$flavor-"), so this should leave out "foo-python-bar" but should affect expressions that include python names.
Once we adopt Fedora's pythonX.Ydist(), this will also be supported.
I am only aware of packageand(), are there similar expressions that should be supported? I don't know all the possible expressions, but I have found, "weakremover", although I don't know what it does. It might be good to have a separate thread about this on the packaging mailing list.
2. What about "Supplements"? Are python packages in that tag renamed automatically?
yes, as of yesterday :)
Great!
3. What if we need to BuildRequires the entire python interpreter, rather than python-base or python-devel? Would we just "BuildRequires: python" and "BuildRequires: python3", or is there a macro to handle that? If there is no macro, is "BuildRequires: python" or "BuildRequires: python2" preferable? What if we need to Requires the entire python interpreter?
There is no BuildRequires macro support for this. I'm considering creating a "python-full-stdlib" symbol which you would then put into %python_module, but that doesn't exist yet.
BuildRequiring "python" should be exceptional, so I'm OK with listing the pythons manually.
Ideally, but depending on what openSUSE version you are targeting there are a lot of packages that do this due to how python was packaged in the past. I don't know if these issues are valid with any supported distro, though. If not, this should probably be mentioned in the wiki. Speaking of which, although not directly relevant to singlespec, it would probably also be good to mention the proper pypi download url in the wiki.
"python2" is the preferred name. (but as of right now I'm unsure whether it works in Leap < 42.3 -- it depends on whether they get the python update that is now headed to SLE)
You can probably submit it there manually.
"Requires: python" works fine and gets renamed to the appropriate interpreter.
Great, this should probably also be in the wiki if it isn't already. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Thu, Mar 9, 2017 at 7:52 AM, jan matejek
hello,
On 8.3.2017 19:00, Todd Rme wrote:
There are some things that I feel are still ambiguous here:
Another thing I found in a spec file I am working on: the "%requires_ge" tag. Do you know if it is handled the same as Requires? I can't even find any documentation on what it does... And it seems Provides of the form "python-foo(bar)" are not being converted (such as "python-sip(api)" in the python-sip package). -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hello, Am Freitag, 10. März 2017, 19:20:44 CET schrieb Todd Rme:
On Thu, Mar 9, 2017 at 7:52 AM, jan matejek
wrote: On 8.3.2017 19:00, Todd Rme wrote:
There are some things that I feel are still ambiguous here: Another thing I found in a spec file I am working on: the "%requires_ge" tag. Do you know if it is handled the same as Requires? I can't even find any documentation on what it does...
# rpm --eval '%requires_eq python3' Requires: python3 = 3.5.1 # rpm --eval '%requires_ge python3' Requires: python3 >= 3.5.1 # rpm -q python3 python3-3.5.1-3.8.x86_64 So these macros give you a versioned requirement for the specified package. The macro definition is in /usr/lib/rpm/macros You are right that they are not documented, so feel free to do it ;-) startpage.com lists 9 hits for "required_eq" and 5 hits for "required_ge" (both times with the quotes) for the whole internet, so documenting those macros in our packaging guideline will easily move us into the top 10 results ;-) Note that thanks to https://bugzilla.opensuse.org/show_bug.cgi?id=888467 these macros might expand to nothing if a package got renamed, which means dependencies might get lost.
And it seems Provides of the form "python-foo(bar)" are not being converted (such as "python-sip(api)" in the python-sip package).
I'll let Jan answer that ;-) Regards, Christian Boltz --
[vim] Um einem Editor-War vorzubeugen: mit Emacs, Kate, nedit und mcedit kann man auch HTML-Dateien erstellen. Und auch mit allen anderen Editoren, die ich an dieser Stelle nicht genannt habe ;-) Du wirst ja immer unfreundlicher ;-))) Womit sollen wir uns denn das lange Wochenende vergnuegen. So ein richtig schoener flame-war, das waere doch wieder einmal was :-) [> Christian Boltz und Heinz W. Pahlke in suse-linux]
-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On 10.3.2017 19:20, Todd Rme wrote:
On Thu, Mar 9, 2017 at 7:52 AM, jan matejek
wrote: hello,
On 8.3.2017 19:00, Todd Rme wrote:
There are some things that I feel are still ambiguous here:
Another thing I found in a spec file I am working on: the "%requires_ge" tag. Do you know if it is handled the same as Requires? I can't even find any documentation on what it does...
added support for %requires_ge and %requires_eq, as well as Requires(pre) and friends. will push it to Factory as soon as Factory is in sane state :)
And it seems Provides of the form "python-foo(bar)" are not being converted (such as "python-sip(api)" in the python-sip package).
these seem to work just fine for me. (but maybe it's something unrelated in the update that fixed it) m.
participants (4)
-
Christian Boltz
-
jan matejek
-
Oliver Kurz
-
Todd Rme