[Distutils] PEP 426 updated based on last round of discussion

Oscar Benjamin oscar.j.benjamin at gmail.com
Wed Jul 17 13:01:12 CEST 2013


On 16 July 2013 14:40, Nick Coghlan <ncoghlan at gmail.com> wrote:
>
> The latest version of PEP 426 is up at http://www.python.org/dev/peps/pep-0426/

Just looking at the "Build requires" section I found myself wondering:
is there any way to say that e.g. a C compiler is required for
building, or a Fortran compiler or any other piece of software that
isn't a "Python distribution"?

The example shows Cython which is commonly built and used with MinGW
on Windows. I guess that it would be possible to create a pypi
distribution that would install MinGW and set it up as part of a
Python installation so that a project such as Cython could depend on
it with e.g.:

"name": "Cython",
"build_requires": [
  {
    "requires": ["pymingw"],
    "environment": "sys.platform == 'win32'"
  }
]
"run_requires": [
  {
    "requires": ["pymingw"],
    "environment": "sys.platform == 'win32'"
  }
]

But it would be unfortunate to depend on MinGW in the event that the
user actually has the appropriate MSVC version.

Or perhaps there could be a meta-distribution called "CCompiler" that
installs MinGW only if the the appropriate MSVC version is not
available. Or could there be an environment marker to indicate the
presence of particularly common requirements such as having a C
compiler?


Oscar


More information about the Distutils-SIG mailing list