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

Add Python 3 bindings #16

Closed
matthewfeickert opened this issue Feb 8, 2024 · 2 comments
Closed

Add Python 3 bindings #16

matthewfeickert opened this issue Feb 8, 2024 · 2 comments
Labels
question Further information is requested

Comments

@matthewfeickert
Copy link
Member

Comment:

At the moment hepmc3 isn't packaged with any Python 3 bindings.

$ docker run --rm -ti mambaorg/micromamba:1.4.9-bullseye-slim
(base) mambauser@0d87e1685c3b:/tmp$ micromamba env create --name hepmc
Empty environment created at prefix: /opt/conda/envs/hepmc
(base) mambauser@0d87e1685c3b:/tmp$ micromamba activate hepmc
(hepmc) mambauser@0d87e1685c3b:/tmp$ micromamba install --channel conda-forge hepmc3
conda-forge/noarch                                  13.5MB @  14.1MB/s  1.0s
conda-forge/linux-64                                32.3MB @  19.2MB/s  1.8s

Transaction

  Prefix: /opt/conda/envs/hepmc

  Updating specs:

   - hepmc3


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

  + _libgcc_mutex      0.1  conda_forge  conda-forge       3kB
  + libstdcxx-ng    13.2.0  h7e041cc_5   conda-forge       4MB
  + libgomp         13.2.0  h807b86a_5   conda-forge     420kB
  + _openmp_mutex      4.5  2_gnu        conda-forge      24kB
  + libgcc-ng       13.2.0  h807b86a_5   conda-forge     771kB
  + hepmc3           3.2.7  hc26451b_0   conda-forge       5MB

  Summary:

  Install: 6 packages

  Total download: 10MB

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


Confirm changes: [Y/n] Y

Transaction starting
_libgcc_mutex                                        2.6kB @  26.6kB/s  0.1s
_openmp_mutex                                       23.6kB @  77.0kB/s  0.3s
libgomp                                            419.8kB @   1.0MB/s  0.4s
libgcc-ng                                          770.5kB @   1.8MB/s  0.4s
hepmc3                                               4.7MB @   9.4MB/s  0.4s
libstdcxx-ng                                         3.8MB @   5.4MB/s  0.7s
Linking _libgcc_mutex-0.1-conda_forge
Linking libstdcxx-ng-13.2.0-h7e041cc_5
Linking libgomp-13.2.0-h807b86a_5
Linking _openmp_mutex-4.5-2_gnu
Linking libgcc-ng-13.2.0-h807b86a_5
Linking hepmc3-3.2.7-hc26451b_0

Transaction finished

To activate this environment, use:

    micromamba activate hepmc

Or to execute a single command in this environment, use:

    micromamba run -n hepmc mycommand

(hepmc) mambauser@0d87e1685c3b:/tmp$

It would in general be nice to be able to use pyHepMC3 from conda-forge installs. Can this be added?

@matthewfeickert
Copy link
Member Author

@chrisburr has pointed out that https://github.com/scikit-hep/pyhepmc already exists and covers this space

$ micromamba search --channel conda-forge pyhepmc
Getting repodata from channels...

conda-forge/linux-64                                        Using cache
conda-forge/noarch                                          Using cache
nodefaults/linux-64                                         Using cache
nodefaults/noarch                                           Using cache


pyhepmc 2.13.4 py310h25c7140_0 (+ 4 builds)
───────────────────────────────────────────

 Name            pyhepmc
 Version         2.13.4
 Build           py310h25c7140_0
 Size            568 kB
 License         BSD-3-Clause AND LGPL-3.0-only
 Subdir          linux-64
 File Name       pyhepmc-2.13.4-py310h25c7140_0.conda
 URL             https://conda.anaconda.org/conda-forge/linux-64/pyhepmc-2.13.4-py310h25c7140_0.conda
 MD5             4becde7612e290694b45e6b12acea34c
 SHA256          9531d2f0a86b730d5e2d09a023432117431bc0c96b5ab4f730ab766947873321

 Dependencies:
  - numpy
  - libgcc-ng >=12
  - libstdcxx-ng >=12
  - python_abi 3.10.* *_cp310
  - python >=3.10,<3.11.0a0

so it is maybe less important to get a python-hepmc3 bindings, but that still might be worth doing for parity with python-hepmc2. Unless people think this would just add confusion.

@matthewfeickert
Copy link
Member Author

but that still might be worth doing for parity with python-hepmc2. Unless people think this would just add confusion.

Actually, the pyhepmc README already summarizes why this (adding additional bindings) isn't really useful. So I think this can get closed and @Kwaizer we can probably view this as already being taken care of for your fellow project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant