[Distutils] tourist here, with a dumb RTFM question

Daniel Holth dholth at gmail.com
Thu Mar 6 19:07:52 CET 2014


pje said:

The "Feature()" facility was never completely implemented or
supported, and even if it were, it should be deprecated now, as it
will not be compatible with the coming packaging systems based on PEP
426. If you need separate features, use separate distributions and
"extras" instead.

(The problem I discovered when I first implemented Feature is that
distutils' build system really isn't capable of having a sane
"configure" step, or saving that configuration. Essentially, distutils
is a little too stateless for that, but Features need it in order not
to act weird in various scenarios. "Extras" are basically the intended
replacement for this functionality, and Features were just kept around
to support legacy projects.)

See also

https://bitbucket.org/pypa/setuptools/issue/58

https://bitbucket.org/pypa/setuptools/issue/65

On Thu, Mar 6, 2014 at 12:55 PM, Michael Bayer <mike_mp at zzzcomputing.com> wrote:
> Hi Distutils !
>
> I don't follow this list and haven't looked at it in a long time.   However, I'm learning via twitter that a brand new setuptools release that's just gone out has just removed the "Feature" mechanism.
>
> Now as you're all rolling your eyes and preparing to bang out frustrated replies how this was well announced and deprecated and warned about and wow really didn't you know the term paper was due today, OK first off let me say I am sorry!  I am not a distutils/setuptools maintainer.    I am just someone that uses it, and as I include setuptools in my setup.py, I am also getting thousands of other people who download my product to use it as well.    And I don't read the setuptools changelog!  Or the setuptools blog.  Or this list.  I assume you guys have it under control (and you certainly do!).  There seem to be other people like me (people who write very widely used software) who also seem surprised!   And that is surprising too (as I am usually the only person to be surprised by these things that should not be surprising).  So I hope you can hold back your frustration with my clueless RTFMness long enough to answer these questions:
>
> 1. where was this announced?   I'm wondering why there weren't loud blaring blog posts and tweets all over the place stating that on March 6, dozens of major packages are going to all break.
>
> 2. what is the plan for unmaintained packages and old versions of existing packages on pypi that "import Feature" and can no longer be installed?    Is it just the case that a large amount of pypi just won't install anymore?
>
> 3. What, if any, is the recommended approach going forward to a Python package that wishes to specify a command-line flag during install.  Here's multiple choice:
>
>     a. you can use new setuptools API <some new way to add --flags>
>
>     b. you can roll it yourself in setup.py using <hack X>
>
>     c. your setup.py should never accept any kind of flags as that interferes with <up-and-coming use case Q>
>
>     d. other
>
> If choice c., then here is another question.  My library includes optional C extensions.   On certain platforms, these C extensions don't build (like on Pypy, or on Windows if you don't have compilation tools installed).  In this regard it gracefully degrades.  But also, I want to be able to have a command line option to determine this as well.  Because!  Maybe I'm installing within a test suite where I need to test the entire library without the C extensions built.    Maybe some user has found a bug in the C extensions, and that user needs to temporarily install the tool without the extensions built.    Other cases for flags are, maybe your library can build with or without SSL support, something like that.
>
> Keep in mind, I actually *won't* be getting bug reports about this because my setup.py already gracefully degrades to distutils!  But still, I'd like to have my --without-cextensions flag somehow.
>
> Thanks for listening and again I apologize for not following the setuptools changelog on a regular basis!
>
>
> - mike
>
>
>
>
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG at python.org
> https://mail.python.org/mailman/listinfo/distutils-sig


More information about the Distutils-SIG mailing list