0

I have very little experience with (i.e. don't really know) python but I'm currently trying to produce a mac app bundle for a package (and ideally after, a script to make it reproducible).

I've tried several approaches but made the most progress by combining py2app, gtk-mac-bundler and good old shell scripting. Still, this produces due to missing distributions (I realized yesterday it's caused by missing egg/dist-info, which are not supported and have been on the py2app feature request list since forever)

Of course, I could just copy all these files in a dumb way, using glob patterns in my shell but I fear that would go against reproducible builds in the future. So, is there any way by which I can get a reference to the files on disk, taking a package name or similar as an argument?

  • Not related, but may be useful: https://stackoverflow.com/questions/54292236/python-pip-find-out-basic-requirements-from-output-of-pip-freeze/54295112#54295112. – CristiFati Nov 11 '19 at 20:52

1 Answers1

1

These libraries are able to read metadata from installed distributions (and more):

sinoroc
  • 18,409
  • 2
  • 39
  • 70
  • 1
    Thanks! I think in the end my problem was the documentation because I'd seen most of those modules but hadn't been able to find what I needed. In the end, I took a look at the source code and realized `importlib.metadata` (and `importlib_metadata`) suit my needs via `distribution()._path` – Gregorio Litenstein Nov 07 '19 at 14:13