libnano / primer3-py

Simple oligo analysis and primer design
https://libnano.github.io/primer3-py
GNU General Public License v2.0
157 stars 43 forks source link

Installation of primer3-py via Conda on Python 3.8, 3.9, and 3.10 #127

Closed akikuno closed 9 months ago

akikuno commented 9 months ago

Regarding the installation of primer3-py via Conda, it seems that only Python 3.11 is currently provided with the latest version (2.0.1).

My personal project uses pysam, and currently Python 3.8, 3.9, and even 3.10 are supported for installation via conda.

Therefore, it would be greatly helpful if primer3-py could also be made available for Python 3.8, 3.9, and 3.10. (Any version is fine for me.)

I would greatly appreciate your supports with this issue.

benpruitt commented 9 months ago

Unfortunately we (the maintainers of primer3-py) don't maintain the conda feedstock for the bioconda package. You'll have to reach out to their team: https://github.com/bioconda/bioconda-recipes/issues

Here's the recipe that they maintain: https://github.com/bioconda/bioconda-recipes/tree/master/recipes/primer3-py

akikuno commented 9 months ago

@benpruitt

Thank you for your response. I will contact them and update you I have made any progress!

corneliusroemer commented 9 months ago

Anyone can put in PRs for bioconda @benpruitt

I was about to close the issue @akikuno made on bioconda (https://github.com/bioconda/bioconda-recipes/issues/44886) because it looked an upstream issue (primer3-py minimum python version being 3.11 from 2.0.1 onwards).

@akikuno it would have helped if you had linked to this issue on the bioconda issue.

corneliusroemer commented 9 months ago

The recipe does not exlcude python 3.11 support, the reason it can't be installed is that bioconda does not yet make Python 3.11 builds (only noarch Python packages work with 3.11 and upwards), see https://github.com/bioconda/bioconda-recipes/issues/37805

Nothing needs to be done on the recipe side, it's an infra thing.

benpruitt commented 9 months ago

@corneliusroemer I read the original comment from @akikuno as a request that primer3-py conda packages be made available for v2.0.1 on Python 3.8, 3.9, 3.10.

Currently there is only a primer3-py v2.0.1 package available for Python=3.11 on the bioconda channel (https://anaconda.org/bioconda/primer3-py/files?version=2.0.1).

It's not clear to my why the bioconda forge isn't producing packages for these other Python versions; the classifiers are correctly specified in the primer3-py setup.py and the meta.yaml file in the recipe doesn't appear to peg to 3.11 or otherwise exclude 3.8-3.10.

corneliusroemer commented 9 months ago

You're right, when I request python=3.10 and primer3-py, I get 0.6.1, I'll look into this!

micromamba create -n augur-py12 --platform osx-64 -c conda-forge -c bioconda "python=3.10" "primer3-py" --dry-run
conda-forge/osx-64                                          Using cache
conda-forge/noarch                                          Using cache
bioconda/osx-64                                             Using cache
bioconda/noarch                                             Using cache
pkgs/r/osx-64                                                 No change
pkgs/main/noarch                                              No change
pkgs/r/noarch                                                 No change
pkgs/main/osx-64                                              No change

Transaction

  Prefix: /Users/corneliusromer/micromamba/envs/augur-py12

  Updating specs:

   - python=3.10
   - primer3-py

  Package               Version  Build               Channel           Size
─────────────────────────────────────────────────────────────────────────────
  Install:
─────────────────────────────────────────────────────────────────────────────

  + xz                    5.2.6  h775f41a_0          conda-forge     Cached
  + python_abi             3.10  4_cp310             conda-forge     Cached
  + ncurses                 6.4  h93d8f39_2          conda-forge     Cached
  + bzip2                 1.0.8  h10d778d_5          conda-forge     Cached
  + libffi                3.4.2  h0d85af4_5          conda-forge     Cached
  + libzlib              1.2.13  h8a1eda9_5          conda-forge     Cached
  + ca-certificates  2023.11.17  h8857fd0_0          conda-forge     Cached
  + readline                8.2  h9e318b2_1          conda-forge     Cached
  + tk                   8.6.13  h1abcd95_1          conda-forge     Cached
  + libsqlite            3.44.2  h92b6c6a_0          conda-forge     Cached
  + openssl               3.2.0  hd75f5a5_1          conda-forge     Cached
  + tzdata                2023c  h71feb2d_0          conda-forge     Cached
  + python              3.10.13  h00d2728_0_cpython  conda-forge     Cached
  + wheel                0.42.0  pyhd8ed1ab_0        conda-forge     Cached
  + setuptools           68.2.2  pyhd8ed1ab_0        conda-forge     Cached
  + pip                  23.3.2  pyhd8ed1ab_0        conda-forge     Cached
  + primer3-py            0.6.1  py310hd528523_1     bioconda         461kB

  Summary:

  Install: 17 packages

  Total download: 461kB

─────────────────────────────────────────────────────────────────────────────

Dry run. Not executing the transaction.
corneliusroemer commented 9 months ago

It looks like @mencian is looking into this: https://github.com/bioconda/bioconda-recipes/pull/44928/commits/b2710630a36bdc4b62a84dca4e04afbc3271d132

Sorry for misunderstanding the original issue and jumping to conclusions.

benpruitt commented 9 months ago

Ok cool, and yeah no worries! Happy to help out however I can on our end + get more involved on the bioconda side of things if that would be helpful to you (@corneliusroemer) or @mencian

corneliusroemer commented 9 months ago

I think it's always helpful if software maintainers "own" their bioconda recipes - that's how I got involved. Thanks for pointing out my false assumptions!

benpruitt commented 9 months ago

Yeah absolutely, makes sense. It honestly wasn't on my radar as it hasn't been an issue up until now (big thanks to @mencian for carrying the torch thus far).

benpruitt commented 9 months ago

Looks like @mencian's PR was merged and the 3.8-3.10 packages are now live on the bioconda channel:

osx-64

(scratch) benpruitt@bpma primer3-py $ conda search -c bioconda/osx-64 primer3-py=2.0.1
Loading channels: done
# Name                       Version           Build  Channel             
primer3-py                     2.0.1 py310he07d9a1_1  bioconda            
primer3-py                     2.0.1 py311h2413b67_0  bioconda            
primer3-py                     2.0.1  py38h604ca31_1  bioconda            
primer3-py                     2.0.1  py39hc889f67_1  bioconda

linux-64

(scratch) benpruitt@bpma primer3-py $ conda search -c bioconda/linux-64 primer3-py=2.0.1
Loading channels: done
# Name                       Version           Build  Channel             
primer3-py                     2.0.1 py310h4b81fae_1  bioconda            
primer3-py                     2.0.1 py311h031d066_0  bioconda            
primer3-py                     2.0.1  py38he5da3d1_1  bioconda            
primer3-py                     2.0.1  py39hf95cd2a_1  bioconda
akikuno commented 9 months ago

@benpruitt @corneliusroemer @mencian

Thank you very much for your work.

Regarding @mencian 's commit, am I correct in understanding that by adding --no-build-isolation option in build.sh, it has become possible to use Python 3.8 and above?

In any case, I am truly delighted that primer3-py is now usable with Python 3.8-3.10!

corneliusroemer commented 9 months ago

yes should work with 3.8-3.10 now

mencian commented 9 months ago

@akikuno No problem! I am glad I was able to help in some way.

Adding --no-build-isolation in build.sh is trivial - I have been adding --no-build-isolation to python package recipes based on grayskull templates that have recently updated the recommended pip install command.

What did the trick is adding skip: True # [py < 38] to meta.yaml and removing python pinnings to let the build selector determine the python version and dependencies for each version 3.8-3.10. Without the skip statement, the CI finds the most recent python version for >=3.8, which was 3.11 at the time v2.0.1 was released.

akikuno commented 9 months ago

@mencian Thank you for teaching me so nicely! I've learned a lot!

akikuno commented 9 months ago

@benpruitt Thank you very much for your assistance in resolving the issue. As I have no further concerns, please feel free to close the issue at your convenience. I am extremely pleased to incorporate primer3-py, an excellent tool, into my project. My thanks again for your efforts in its development!