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-specific noarch packages #805

Open
jbednar opened this issue Mar 4, 2016 · 10 comments
Open

Python-specific noarch packages #805

jbednar opened this issue Mar 4, 2016 · 10 comments
Labels
stale::recovered [bot] recovered after being marked as stale tag::noarch related to noarch builds

Comments

@jbednar
Copy link

jbednar commented Mar 4, 2016

I work almost entirely with pure Python packages with the same codebase for both Python2 and Python3 (param, imagen, holoviews), and thus I should be able to build noarch conda packages and not have to worry about different platforms. However, in some cases we need to build packages that specify different dependencies on Python2 compared to Python3. As far as we can tell, specifying the Python version for the package also means specifying the OS. Is there a way to build a package that is tied to a Python major version without being tied to a particular OS? If not, can that capability be added?

@joelhullcio
Copy link

I would like to also request the ability to build a noarch conda package that is python version specific but not platform (OS) specific. At JPM we need to build python2.7 packages that can run on linux-64 and windows-64 but we only have a linux box to build on. The packages we import in the code are available on both platforms and we develop and test on windows and test and deploy on linux so we know the code is compatible on both platforms so it would be better to only have to build one copy of each package for deployment. However, we want to restrict the conda packages to only install on python27 environments.

May I suggest adding a new parameter to conda recipes called just "noarch" that allows the python version to be specified but is platform agnostic.

@msarahan
Copy link
Contributor

msarahan commented Jul 6, 2016

I'm not sure how cross-platform bytecode is, but I'll look into this soon.

@msarahan msarahan added this to the Noarch improvements milestone Aug 13, 2016
@nicoddemus
Copy link
Contributor

noarch packages are already supported, I believe this can be closed?

@mcg1969
Copy link
Contributor

mcg1969 commented Nov 8, 2017

Ping. I'd like us to consider this again. We're hitting issues here with a customer, where a package is Python 3 only, but we're unable to specify that and have a noarch package. So this is not a matter of having a matrix of noarch packages, but simply being able to restrict the python versions that are compatible with a single package.

That said, it's not clear that why we couldn't support multiple python-version-specific builds of a noarch package.

@msarahan
Copy link
Contributor

msarahan commented Nov 8, 2017

You can put constraints on python in the run section, and have it still be valid noarch. You won't get nice filename strings like you do with wheels, but the functionality is there.

@mcg1969
Copy link
Contributor

mcg1969 commented Nov 8, 2017

Ah, that's great to know, thanks!

@mcg1969
Copy link
Contributor

mcg1969 commented Nov 8, 2017

Does this mean we could conceivably build separate Python2 and Python3 noarch packages using the --python= kwargs? Or does that kwarg attempt to modify the build section as well? Perhaps we can modify that behavior so that, for noarch packages, only the run section is versioned.

@beeankha beeankha added the tag::noarch related to noarch builds label Aug 25, 2023
@beeankha beeankha removed this from the Noarch improvements milestone Aug 25, 2023
Copy link

Hi there, thank you for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue at hand
  2. Comment that the issue is still reproducible and include:
    - What OS and version you reproduced the issue on
    - What steps you followed to reproduce the issue

NOTE: If this issue was closed prematurely, please leave a comment.

Thanks!

@github-actions github-actions bot added the stale [bot] marked as stale due to inactivity label Aug 25, 2024
@jbednar
Copy link
Author

jbednar commented Aug 25, 2024

@msarahan 's comment makes it clear we can put constraints on the Python version, but there's not been a reply to @mcg1969 's question about whether we can easily build multiple packages for each Python version, or to my question about how to specify different dependencies depending on the Python version. Of course, Python 2 (my original reason for the request) no longer matters, but I think this would still come up for different Python 3 versions, particularly for functionality that's been added in a later Python 3 release but would need to be a separate download for earlier releases.

@mcg1969
Copy link
Contributor

mcg1969 commented Aug 25, 2024

Actually separate builds for different Python versions is doable. I've learned a fair amount since I commented that :-)

The noarch pattern is actually much more flexible than I first conceived, especially coupled with variants and virtual meta packages.

@github-actions github-actions bot added stale::recovered [bot] recovered after being marked as stale and removed stale [bot] marked as stale due to inactivity labels Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale::recovered [bot] recovered after being marked as stale tag::noarch related to noarch builds
Projects
Status: 🆕 New
Development

No branches or pull requests

6 participants