Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 06 21:57
    smheidrich commented #3489
  • Aug 06 21:56
    smheidrich opened #3491
  • Aug 06 19:57
    abravalheri opened #3490
  • Aug 06 19:25
    abravalheri synchronize #3488
  • Aug 06 19:25

    abravalheri on pep660

    [Docs] Add two footnotes about … [Docs] Fix a note about PEP660 … Update pyparsing in vendored.txt and 26 more (compare)

  • Aug 06 19:13

    abravalheri on v63.4.2

    (compare)

  • Aug 06 19:13

    abravalheri on main

    Add news fragment for #3481 Bump version: 63.4.1 → 63.4.2 (compare)

  • Aug 06 18:59
    abravalheri commented #3451
  • Aug 06 18:58
    abravalheri commented #3451
  • Aug 06 18:46
    abravalheri commented #3464
  • Aug 06 18:45
    abravalheri commented #3472
  • Aug 06 18:44
    abravalheri commented #3407
  • Aug 06 18:40
    abravalheri closed #3451
  • Aug 06 18:40
    abravalheri closed #3487
  • Aug 06 18:40
    abravalheri closed #3481
  • Aug 06 18:40
    abravalheri closed #3407
  • Aug 06 18:40
    abravalheri closed #3453
  • Aug 06 18:40
    abravalheri closed #3464
  • Aug 06 18:40
    abravalheri closed #3472
  • Aug 06 18:40
    abravalheri closed #3467
Paul Ganssle
@pganssle
Ralf Weber
@RJMW
pypa/setuptools#232 Please, any progress on Issue 1 in this post? I am struggling to find a way to install the requirements when cmdclass and install is included in setup.py. Workaround?
Paul Ganssle
@pganssle
I'm not sure I understand that issue. Hard to know why
Paul Ganssle
@pganssle
Sorry, that should have said "Hard to know how to work around this issue without knowing what you need to do" @RJMW
Stephan Steinbach
@ssteinbach
Hello, is there a good way to figure out the minimum version of setuptools my project requires? At the moment the problematic fields seem to be project_urls and tests_require
Jason R. Coombs
@jaraco
@ssteinbach I’m pretty sure tests_require has been around a very long time. I’m less sure about project_urls. You can refer to the history, which may or may not make mention of that particular change.
Thomas Robitaille
@astrofrog
Hi all, I'm updating some of my packages to use the declarative setup.cfg way of specifying package options instead of listing them in setup.py. But I was just curious as to what the plan is for future in terms of setup.cfg vs pyproject.toml - is the long term plan to have everything declared in pyproject.toml instead of setup.cfg?
Jason R. Coombs
@jaraco
@astrofrog No plans per se. … but we do recognize the disparity. If you’d like to take on that challenge, I’d be open to it. Probably no small task, but also probably achievable.
Thomas Robitaille
@astrofrog
Ok thanks, I was mostly curious as to whether there were opinions on what something should look like at the end, though I realize that it will take some work :)
Stephan Steinbach
@ssteinbach
@jaraco Thanks! We're dealing with really old versions of setuptools. We ended up doing a kind of ugly thing in setup.py to detect and error out: PixarAnimationStudios/OpenTimelineIO#397
Thomas Robitaille
@astrofrog
Hi all, is it safe to rely on from pkg_resources.extern.packaging.specifiers import SpecifierSet or is it not in the public API?
Basically I want to parse and interpret the content of the python_requires configuration item, and that seems to be parseable by SpecifierSet
an alternative would be to do something like Requirement.parse('python' + python_requires).specifiers
Ronny Pfannschmidt
@RonnyPfannschmidt
@astrofrog what prevents just using packaging directly?
Thomas Robitaille
@astrofrog
@RonnyPfannschmidt - I don't know if I can rely on it being installed for users, and would prefer not to introduce a new dependency
Paul Ganssle
@pganssle
I'm a bit stymied here, a co-worker asked me about deploying Python scripts into directories other than bin/
Seems like I can do it if I make them data files, but then the shebang has to be hard-coded.
Anyone know if there's a way to do that with console_scripts?
Ronny Pfannschmidt
@RonnyPfannschmidt
@pganssle thats not part of the normal deployment mechanisms python has
whats the actual use-case
Paul Ganssle
@pganssle
@RonnyPfannschmidt They want the script to be aimed at libexec instead of bin.
It's not a terribly uncommon use case to put scripts in libexec or another place on the path with lower or higher precedence than bin.
It might be that they don't care about portability (as in, what the shebang does in a virtualenv) in this case, but we do allow specifying the target directory for other things, and it kinda sucks to say, "Oh this just won't work in a virtualenv"
Plus there is the --script-dir argument, which I gather allows you to, at runtime, specify a target for all scripts.
Ronny Pfannschmidt
@RonnyPfannschmidt
@pganssle practically speaking - they have to make it a non-binary package (disallowing wheels) and inject a new command for the installation which handles the alternative script install location
whats the context of the script? something like a git addon?
Paul Ganssle
@pganssle
I don't follow why you can't have wheels. data_files is able to install things in libexec just fine.
Ronny Pfannschmidt
@RonnyPfannschmidt
@pganssle you wanted to sort out the shebangs?
thats not part of the toolchain that does wheels and puts them in place
so you either add a own installer, or prevent wheels
Paul Ganssle
@pganssle
I just want it to have feature parity with console_scripts.
I'd like to be able to recommend what to do if they want something that does whatever console_scripts / scripts does, but installs to a different location than bin/
Ronny Pfannschmidt
@RonnyPfannschmidt
thats simply not part of the current tool chain, and there is no standard for it properly ratifying it
Cody Piersall
@codypiersall
I have a Python package I need to depend on that is hosted in at an internal git repository. It has a setup.py, but not at the root of it's repository. Can I specify the location to the setup script somehow?
Axel Huebl
@ax3l
Hi there, does someone know I can get the list of user-requested extras inside my setup.py?
I need to know what a user selected in order to accordingly set a CMake option: pypa/setuptools#1712
Jason R. Coombs
@jaraco
@ax3l That’s not possible as far as I know. If the current project depends on it to decide how to build itself, then it’s not really an extra (as intended). Extras are intended for install-time dependency resolution, not build-time. You’ll want to structure your project so it can support running with and without the extras at run-time… maybe that means building with and without the libs the extras might require, or maybe it means pushing that functionality into the extras themselves.
nvm. I see the conversation is happening in Github.
Axel Huebl
@ax3l
@jaraco thanks for the feedback. yep, I am not using extras anymore since I cannot easily separate this into a runtime dependency
Jason R. Coombs
@jaraco
Cool. Wish the system had been able to readily address your use-case, but glad you found something workable.
Axel Huebl
@ax3l
Yep, I probably misunderstood its design idea. Would be awesome to express build variants as well.
Paul Ganssle
@pganssle
I'm planning on merging pypa/setuptools#1706 then cutting a new minor release.
@jaraco @benoit-pierre Any objections?
Anything you want to see merged before the release?
(I don't have an enormous amount of time for this, so anything that requires too much work is equivalent to just delaying the release)
Jason R. Coombs
@jaraco
@pganssle No objections, and I’m not aware of any other blocker issues, so proceed as you see fit.
dimahassania
@dimahassania
how does setuptools choose which cmdclass to run ? depending on the install method (using -e), my custom command doesn't run
Jason R. Coombs
@jaraco
@dimahassania pip install -e invokes setup.py develop.
sdraper-CS
@sdraper-CS

Hello. I'm experiencing a problem where the end symptom is setuptools complaining setuptools-scm was unable to detect version for.... Ultimately this is during a conda environment create, via pip as an intermediary. I can reproduce it with pip directly just attempting to install one package. The package in question is being installed from a github repo via SSH. It is not in the root of the repo. The setup.py looks like this:

import os
from setuptools import setup

setup(
    name            = 'c12e_data',
    packages        = ['c12e.data'],
    use_scm_version = {
        'root'       : '..',
        'relative_to': os.path.dirname(__file__)
    },

    install_requires = [
        'typing_extensions'
    ],

    tests_require = [
        'hypothesis',
        'pytest >= 3.8.1, < 4.0',
        'c12e_testing'
    ],

    extras_require = {
        's3': ['boto3 >= 1.0.0, < 2.0.0']
    },

    setup_requires = [
        'setuptools_scm',
        'pytest-runner'
    ]
)

This is in the c12e_data directory within the git repo root. The conda environment.yml pins the versions of pip and setuptools according to:

channels:
  - conda-forge
  - pytorch
  - defaults
dependencies:
  - pip=19.0.1
  - python=3.6.8
  - setuptools=40.7.3
  - toolz=0.9.0
  - scikit-learn
  - pip:
    - git+ssh://git@github.com/CognitiveScale/c12e-python.git@v1.0.4#subdirectory=c12e_data

The really odd thing is that this exact install was working fine a few weeks ago, and so far as I can tell nothing has changed (the git tag specified is old and unchanged, the versions of pip and setuptools are pinned and unchanged). All I can think of is that some unpinned transitive dependency (of setuptools or something) must have changed.

I have spent several hours following various issue threads and checking with respect to them (including detailed debug output from pip and setuptools but not gotten anywhere. Has anyone seen anything similar recently?
Paul Ganssle
@pganssle
Did you try pinning setuptools_scm to an older version in your pyproject.toml? Seems like it is most likely to be a change in that package.