Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3 templates #59

Closed
sebix opened this issue Aug 11, 2016 · 4 comments
Closed

Python 3 templates #59

sebix opened this issue Aug 11, 2016 · 4 comments

Comments

@sebix
Copy link
Contributor

sebix commented Aug 11, 2016

For python3 packages on opensuse, all occurences of python- have to be replaced with python3. See

We could do a simple replace if the major version is 3, and on the other hand we can create py3 and p2 templates, e.g. templates/3/opensuse.spec and templates/2/opensuse.spec and we chose the version based on the python-version which is running py2pack in that moment.

What would be the preferred method?

I don't know how this is handled in Fedora.

@toabctl
Copy link
Member

toabctl commented Aug 11, 2016

For python3 packages on opensuse, all occurences of python- have to be replaced with python3. See

We could do a simple replace if the major version is 3, and on the other hand we can create py3 and p2 templates, e.g. templates/3/opensuse.spec and templates/2/opensuse.spec and we chose the version based on the python-version which is running py2pack in that moment.

Or we could create py2 and py3 packages from a single spec.

What would be the preferred method?

good question. I guess the easiest way for now would be to create an extra template which can be used.

I don't know how this is handled in Fedora.

I think Fedora (and most other distros) build py2 and py3 packages from a single spec file (when possible). See https://fedoraproject.org/wiki/Packaging:Python#Example_common_spec_file

@sebix
Copy link
Contributor Author

sebix commented Aug 14, 2016

Or we could create py2 and py3 packages from a single spec.

How to detect if a package supports both 2 and 3 (With the same codebase, which is not always the case)?

good question. I guess the easiest way for now would be to create an extra template which can be used.

Also the easiest to do :)

I think Fedora (and most other distros) build py2 and py3 packages from a single spec file (when possible). See https://fedoraproject.org/wiki/Packaging:Python#Example_common_spec_file

For fedora we can adapt the template to the above, but without more knowledge about Fedora, I don't want to try it.

As we have different devel-projects for 2 and 3 in opensuse, that's not possible anyway.

@xambroz
Copy link

xambroz commented Feb 20, 2017

I don't know how this is handled in Fedora.
I think Fedora (and most other distros) build py2 and py3 packages from a single spec file (when possible).
See https://fedoraproject.org/wiki/Packaging:Python#Example_common_spec_file

Hello,
I have tried to update the template for Fedora to make it ready building both py2 and py3 subpackages.
Building of the py3 can be disabled easily by one define on the beginning of spec file.

#75

Best regards
Michal Ambroz

@toabctl
Copy link
Member

toabctl commented Mar 2, 2017

@sebix given that this issue was about python3 for the opensuse template I close it because we have now singlespec support in py2pack (see #77 )

@toabctl toabctl closed this as completed Mar 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants