[Distutils] Re: Making setup.py run external command to build

2021-04-02 Thread Julian Smith
On Sun, 28 Mar 2021 18:13:26 +0100 Julian Smith wrote: > On Sat, 27 Mar 2021 00:05:35 + > Julian Smith wrote: > > I eventually managed to local installs from sdist to work with pip-18.1 > by modifying my pyproject.toml, changing: > > [build-system] > requires = [] > > to: >

[Distutils] Re: Making setup.py run external command to build

2021-03-28 Thread Julian Smith
On Sat, 27 Mar 2021 00:05:35 + Julian Smith wrote: > On Fri, 26 Mar 2021 23:19:30 + > "Thomas Kluyver" wrote: > > > On Fri, 26 Mar 2021, at 23:04, Julian Smith wrote: > > > I can't tell from pip-18.1's diagnostics what exactly is going wrong. > > > > > > Given that my setup.py

[Distutils] Re: Making setup.py run external command to build

2021-03-26 Thread Julian Smith
On Fri, 26 Mar 2021 23:19:30 + "Thomas Kluyver" wrote: > On Fri, 26 Mar 2021, at 23:04, Julian Smith wrote: > > I can't tell from pip-18.1's diagnostics what exactly is going wrong. > > > > Given that my setup.py implements the normal distutils-style argv > > handling, i was expecting

[Distutils] Re: Making setup.py run external command to build

2021-03-26 Thread Thomas Kluyver
On Fri, 26 Mar 2021, at 23:04, Julian Smith wrote: > I can't tell from pip-18.1's diagnostics what exactly is going wrong. > > Given that my setup.py implements the normal distutils-style argv > handling, i was expecting things to work, but pip-18.1 appears to fail > before it even tries to run

[Distutils] Re: Making setup.py run external command to build

2021-03-26 Thread Julian Smith
On Thu, 25 Mar 2021 20:01:12 + "Thomas Kluyver" wrote: > On Thu, 25 Mar 2021, at 19:07, Julian Smith wrote: > > I was a little surprised to find out that one can't use pip to create > > an sdist, but i'm a bit late to this party and it looks like there's > > been plenty of discussion about

[Distutils] Re: Making setup.py run external command to build

2021-03-25 Thread Jeremy Stanley
On 2021-03-25 20:01:12 + (+), Thomas Kluyver wrote: > I'm surprised it fails on the wheels - how exactly are you using > pip? > > If you're relying on PEP 517, then pip 18.1 is too old to install > it from an sdist - PEP 517 support was added in 19.0 >

[Distutils] Re: Making setup.py run external command to build

2021-03-25 Thread Jeremy Stanley
On 2021-03-25 19:07:50 + (+), Julian Smith wrote: [...] > I've come across a problem where an old pip-18.1 fails to install from > an sdist or wheel, with error: > > ERROR: You must give at least one requirement to install (see "pip help > install") > > pip-20.2.1 and pip-21.0.1

[Distutils] Re: Making setup.py run external command to build

2021-03-25 Thread Thomas Kluyver
On Thu, 25 Mar 2021, at 19:07, Julian Smith wrote: > I was a little surprised to find out that one can't use pip to create > an sdist, but i'm a bit late to this party and it looks like there's > been plenty of discussion about this in the past. There is now the (quite new) 'build' tool which can

[Distutils] Re: Making setup.py run external command to build

2021-03-25 Thread Julian Smith
On Tue, 23 Mar 2021 12:34:47 + "Thomas Kluyver" wrote: > On Tue, 23 Mar 2021, at 11:13, Julian Smith wrote: > > So as far as i can tell, there are two levels of abstraction at which > > on can implement customised Python packaging (the setuptools.setup()'s > > callbacks or the setup.py

[Distutils] Re: Making setup.py run external command to build

2021-03-23 Thread Tzu-ping Chung
> On 23 Mar 2021, at 19:13, Julian Smith wrote: > > Approach 1 is to pass callbacks to distutils.core.setup() or > setuptools.setup(). However there doesn't appear to be documentation in > either of these modules about what such callbacks should do or how/when > they are called. The only way to

[Distutils] Re: Making setup.py run external command to build

2021-03-23 Thread Bernat Gabor
The only interface for the backend (setuptools) talking with the frontend (pip) is https://www.python.org/dev/peps/pep-0517/#build-backend-interface. The PEP itself is the documentation. Lack of documentation on how to fully automate backend parts it's up to the backend. distutils is deprecated

[Distutils] Re: Making setup.py run external command to build

2021-03-23 Thread Thomas Kluyver
On Tue, 23 Mar 2021, at 11:13, Julian Smith wrote: > So as far as i can tell, there are two levels of abstraction at which > on can implement customised Python packaging (the setuptools.setup()'s > callbacks or the setup.py command line), but neither one seems to be > documented or standardised.

[Distutils] Re: Making setup.py run external command to build

2021-03-23 Thread Julian Smith
I've recently returned to this issue after a while away. I've ended up with a custom setup.py that runs the external build system as required, and allows pip install/sdist/bdist_wheel to work. However as a result of all this. i have some general questions. Basically i'm confused about the lack

[Distutils] Re: Making setup.py run external command to build

2020-12-14 Thread Dan Stromberg
I've had some luck with this sort of thing: https://stromberg.dnsalias.org/svn/binary-tree-mod/trunk/setup.py It just os.system's make, and then assumes everything is built thenceforth. On Fri, Dec 11, 2020 at 7:10 AM Julian Smith wrote: > Hello > > I have a project with a fairly involved

[Distutils] Re: Making setup.py run external command to build

2020-12-14 Thread Daniel Holth
You would have to have a high tolerance for learning SCons. I'm aware that this is not for everyone. Then you could write a SConstruct with dependent tasks in a normal build system way. e.g. target = env.Command("a task", ...) platlib = env.Whl("platlib", target, root=".") whl =

[Distutils] Re: Making setup.py run external command to build

2020-12-14 Thread Julian Smith
On Mon, 14 Dec 2020 10:25:41 -0500 Daniel Holth wrote: > enscons is an alternative to distutils. > Yes, i understand this. But enscons is for building python packages with scons. My project does not use scons, so i don't understand how it can help here. Unless... are you are suggesting that

[Distutils] Re: Making setup.py run external command to build

2020-12-14 Thread Daniel Holth
enscons is an alternative to distutils. -- Distutils-SIG mailing list -- distutils-sig@python.org To unsubscribe send an email to distutils-sig-le...@python.org https://mail.python.org/mailman3/lists/distutils-sig.python.org/ Message archived at

[Distutils] Re: Making setup.py run external command to build

2020-12-14 Thread Julian Smith
On Fri, 11 Dec 2020 10:32:13 -0500 Daniel Holth wrote: > I've been working on ensconced which lets you use a SConstruct to > build. It is easier than customizing distutils. > > https://github.com/dholth/pysdl2-cffi/blob/master/SConstruct is the > most code-generation-y project. Its build might

[Distutils] Re: Making setup.py run external command to build

2020-12-11 Thread Daniel Holth
I've been working on ensconced which lets you use a SConstruct to build. It is easier than customizing distutils. https://github.com/dholth/pysdl2-cffi/blob/master/SConstruct is the most code-generation-y project. Its build might be a little out of date and it has an independent setup.py building