Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 08:05
    nsait-linaro commented #2758
  • 08:02
    nsait-linaro commented #2758
  • Sep 26 22:56
    songmeixu edited #2803
  • Sep 26 22:55
    songmeixu opened #2803
  • Sep 26 15:05
    jaraco commented #2778
  • Sep 26 15:04
    jaraco labeled #2778
  • Sep 26 14:47

    jaraco on main

    sdist: Accept -u/--owner and -g… Merge pull request #2800 from j… (compare)

  • Sep 26 14:47
    jaraco closed #2800
  • Sep 26 14:47
    jaraco closed #1893
  • Sep 26 14:47
    jaraco commented #2800
  • Sep 26 14:47
    jaraco commented #2800
  • Sep 25 22:40
    jaraco commented #2758
  • Sep 25 15:48
    hugovk edited #1988
  • Sep 25 15:46
    hugovk edited #1988
  • Sep 25 11:49
    Cimbali commented #1988
  • Sep 25 07:10
    pradyunsg commented #2705
  • Sep 25 07:09
    pradyunsg closed #2705
  • Sep 25 07:09
    pradyunsg commented #2705
  • Sep 25 04:46
    jaraco commented #1988
  • Sep 25 04:33
    jaraco commented #2784
William Deegan
@bdbaddog
@jaraco - many outstanding PR's in flight.. and I guess we'd lose easy access to git history though could use -follow I beleive but the default wouldn't.
Jason R. Coombs
@jaraco
@bdbaddog In my experience, git is competent at tracking moves, especially if moves are invoked via git. But I grant you, that’s troublesome. If that’s your only constraint, I’d recommend pushing through it and doing away with the complications it adds.
Ronny Pfannschmidt
@RonnyPfannschmidt
@jaraco git does not track any moves at all - it always infers them from the snapshots (hence some people moving files in separate commits before commiting changes to get better merge handling)
William Deegan
@bdbaddog
Good morning. Finally got around to reorging my source tree to get rid of src/engine/SCons and just make it SCons but getting stuck on changes needed for setup.cfg... It's no longer including some important package data..
William Deegan
@bdbaddog
Got it.. Forgot to modify MANIFEST.in.. ideally if there was a directory referenced in MANIFEST.in which didn't exist, there's be some warning/error?
Jason R. Coombs
@jaraco
@bdbaddog There may be room for improvement there. I’m not familiar with the history, so don’t know what confounding factors may be lurking.
Adam Zegelin
@zegelin
Anyone got a link to the legacy documentation for setuptools? I've got an existing project that uses setup.py that I currently don't want to upgrade to whatever the latest flavour–of–the–month config format. But I'd like to understand what options I can pass to setup(...), yet I can't find the docs anywhere.
Adam Zegelin
@zegelin

More DDG-ing found it: https://packaging.python.org/guides/distributing-packages-using-setuptools/#setup-args

Why isn't this documented on the setuptools project anywhere?

Jason R. Coombs
@jaraco
@zegelin Probably because Setuptools doesn’t own the syntax, but only extends what distutils does… and the args are described there (https://docs.python.org/3/distutils/setupscript.html).
There’s an effort underway for Setuptools to adopt distutils, including its documentation, so as that happens, the documentation should become more unified and clear.
Simsalaba
@Simsalaba
I'm using setuptools to create a dist but my python script requires a C executable. Can I make it so that the Setup.py gets the repo, builds and installs the C-code when it's installing my script?
Ronny Pfannschmidt
@RonnyPfannschmidt
@Simsalaba typically thats not safely possible in a portable way - with some mored etails a workable suggestion may be possible (like for example distro or flatpack based distribution) - whats the use-case of the dist?
Thomas Robitaille
@astrofrog
Hi all, I'm curious as to whether there is any guarantee on the order in which requirements with environment markers are parsed in setup.cfg? I'm trying to think about how to simplify this kind of configuration: https://github.com/scipy/oldest-supported-numpy/blob/01cce7f8d725f3498e3730e9a890a61dc19110fb/setup.cfg#L25-L55
Jason R. Coombs
@jaraco
@astrofrog: I believe the requirements are considered unordered (or no guaranteed order), but more importantly, there’s no precedence, so while you could write req==3 and req==4 (two different, conflicting versions), they’re both considered requirements of the package, and it’s probably up to the installer (pip or other) to determine the meaning of that declaration. So the way it’s written there is perhaps the best thing you have right now - a list of requirements all of which are mutually exclusive (only one active in a given environment).
Bernát Gábor
@gaborbernat
@jaraco can you please address pypa/setuptools#2505, it's been blocking virtualenv for the last two weeks :-|
Jason R. Coombs
@jaraco
Hi @gaborbernat . Sorry for the inconvenience. I presume everything’s good now. Let me know if not.
Leon
@adigitoleo
Hi there, and thanks for all the work you people are doing! I'm quite inexperienced in this area, but I'm contributing to a private Python project and wanted to set up proper packaging metadata for eventual PyPi release. I've mostly figured it out (I think), but this library will depend on a choice of parallelisation frameworks (ray OR charm4py) and I'm a bit stumped on how to specify required but mutually exclusive dependencies in the setup.cfg. I know about extras_require but ideally I want a way to tell pip that one and only one of the frameworks needs to be installed. (Sorry if it's the wrong place to ask, I posted on r/learnpython but no one responded yet).
Jason R. Coombs
@jaraco
Hey @adigitoleo . What you’re asking for isn’t an existing feature. The closest you can get is to indicate each dependency as an extra (‘ray’ or ‘charm’) and then inform your users to indicate yourlib[charm] or yourlib[ray]. If you’ll only ever have the two dependencies, you could nominate one as primary and indicate it as regular dependency and indicate the other as the extra, and if the extra is present, defer to it.
I agree it might be nice to have the feature you’re describing. I don’t know if it has been filed as a feature request, but if not, a good place to request it would be github.com/pypa/packaging-problems
(because although Setuptools might implement such a feature, it’s going to depend on some standards being developed in advance)
Leon
@adigitoleo
Thanks @jaraco ! I'll probably go with the 'extras' option for now. I'll might submit a request later this week as you suggest. Maybe something along the lines of what Arch Linux does with provides in it's PKGBUILDs... well it's not critical and I'm glad I wasn't missing something obvious!
Ronny Pfannschmidt
@RonnyPfannschmidt
@jaraco any opinion on adding support in setuptools to consider pyproject.toml with a ´[tool.setuptools.setup_cfg_data]` map and/or a multi-line string value of it (with the promise that the multi-line string will be certainly compatible and the map/nested map will approach compatible)
Roy Williams
@rowillia

Howdy! I'm far from an expert on packaging and elf binaries, but I wanted to get people's thoughts on issues facing libraries using protobuf - e.g. grpc/grpc#24897, protocolbuffers/protobuf#8291 . The core of the issue appears to be Protobuf's Python library statically links in libprotobuf (https://github.com/protocolbuffers/protobuf/blob/master/python/setup.py#L188-L190) . In turn, when another library like tensorflow or gRPC also links in libprotobuf we get symbol conflicts and pain. To my knowledge this is pretty similar to the numeric stack's situation (e.g. numpy & scipy both use and ship libopenblas) which doesn't have these issues - but importantly instead of relying on static linking they ship .dylib or .so files patched up with auditwheel or delocate.

What would your suggestions be here as folks that are more expert in packaging? Is the numpy way the blessed way?

Thanks so much!

Ronny Pfannschmidt
@RonnyPfannschmidt
@rowillia i believe you will have to reach out to the numpy community to learn more, im not aware of any of them feeding details back to pypa/setuptools unless there is actual bugs
Jason R. Coombs
@jaraco
Sorry for the delay @RonnyPfannschmidt. Regarding setuptools.setup_cfg_data, I’m not sure the context, but I think you’re asking about supporting pyproject.toml as another format to solicit config for setuptools. I’m not opposed to supporting pyproject.toml, but I’d really like not to have too many ways to do a thing… and setup.cfg is just now reaching maturity. I’d definitely like to avoid setup_cfg in the name. It should be meaningful keys like tools.setuptools.metadata or tools.setuptools.options (mapping to metadata and options in setup.cfg).
Ronny Pfannschmidt
@RonnyPfannschmidt
@jaraco between now and then i was made aware of https://raw.githubusercontent.com/python/peps/master/pep-0621.rst so the idea is zilch anyway
@jaraco as for the setup_cfg_data - it was merely to include setup.cfg data either verbatim or as nested structure without using up the complete tool.setuptools namespace to enable eventually working out meaningful keys
hmm, i need to put this on my element
awr-paul
@awr-paul

Hiya, I have a setup.py that is currently using setuptools to build a C++ python extension (which in-turn is part of a conda recipe). I'd need to ship some C++ header files with this package, but I can't seem to get it to work. I have added the headers into my setup, like this:

from setuptools import setup
setup(..., headers=[str(fn) for fn in Path("include").glob("**/*") if fn.is_file()])

However, when I install the package using python setup.py install it creates an egg file without installing these headers.

I've read on various forums how to install a package that includes headers but nothing that I have tried works. For example, I've tried adding recursive-include include *.hpp to MANIFEST.in but this makes no difference to what gets installed. I've also tried using distutils.core.setup instead of setuptools.setup but then my pybind11 extension does not build. I've tried using pip install . but then my data_files not longer get packaged and my unit-tests failed.

The setuptools documenting is a bit sparse when it comes to packaging headers files and a lot of the information in online forums is very old. I can see that setuptools does have a install_headers command, can someone point me to a example of how this works?

Thanks!

Jason R. Coombs
@jaraco
Hi @awr-paul . I’m afraid I don’t have a lot of experience with extension modules, and the experience I do have is about getting the package to install importable modules from C/.h files.
It seems like you’re conflating two things - shipping files with the source distribution or installing header files with the package. What is it you’re trying to achieve?
I’m not familiar with the headers directive. I’d suggest to look into the distutils/setuptools source to see what it uses that value for.