Re: Can't run setup.py offline due to setup_requires - setup.py calls home

2019-02-11 Thread Chris Narkiewicz via Python-list
On 11/02/2019 19:30, Chris Narkiewicz via Python-list wrote:
> Is there any extra step I have to take?

Ok, I'll respond to myself, as this was really silly.
Debian ships hopelessly obsolete pip 9.PEP 518 is supported in pip 10+.

Cheers,
Chris



signature.asc
Description: OpenPGP digital signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Can't run setup.py offline due to setup_requires - setup.py calls home

2019-02-11 Thread Chris Narkiewicz via Python-list
On 11/02/2019 15:57, Ben Finney wrote:
> All of the build dependencies, *including* the ones specified in
> ‘setup_requires’?

Yes. easy_install simply doesn't look there. If I provide
~/.pydistutils.cfg with a path to find_links, it works ok.

Config file in $HOME however is no-go for a CI or build servers, as I
have no control over automated build environment (launchpad.net in this
case).

> To avoid the Setuptools bug, the PyPA recommends dropping the
> ‘setup_requires’ option and instead specifying build dependencies in a
> PEP 518 formatted metadata file
> https://github.com/pypa/setuptools/issues/293>.

Ok, I took Automat-0.7.tar.gz package and I modified it:
1) removed setup_requires
2) added pyproject.toml with content:

[build-system]
requires = ["setuptools-scm", "m2r"]

3) package is dropped into pypi directory with all dependencies.

However, when I try to install Automat from source, it doesn't work.

(venv)$ pip3 install --no-index --find-links=pypi --no-binary=':all:'
--no-cache Automat

I see that those build-time dependencies are not installed and build
complains about missing scm and m2r packages.

Is there any extra step I have to take?

Best regards,
Chris



signature.asc
Description: OpenPGP digital signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Can't run setup.py offline due to setup_requires - setup.py calls home

2019-02-11 Thread Ben Finney
Chris Narkiewicz via Python-list  writes:

> debian/rules calls this pip to install all requirements from local
> package collection:
>
> pip3 install --log=... --no-cache --no-index --find-links=pypi
> --no-binary=":all:" -r requirements.txt

As you have observed, this fails because Setuptools does not correctly
handle the ‘setup_requires’ option
https://github.com/pypa/setuptools/issues/457>.

> Directory pypi contains ALL dependencies required for build.

All of the build dependencies, *including* the ones specified in
‘setup_requires’?

> This works ok when build server has connection to network, but fails for
> offline builds. I pinpointed the problem to package Automat, that
> specifies some dependencies via setup_requires=[...]:
>
> setup(
> ...,
> setup_requires=[
> 'setuptools-scm',
> 'm2r',
> ],
> ...
> )

To avoid the Setuptools bug, the PyPA recommends dropping the
‘setup_requires’ option and instead specifying build dependencies in a
PEP 518 formatted metadata file
https://github.com/pypa/setuptools/issues/293>.

You could create such a specification (by adding a metadata file),
ensure those dependencies are also present locally, and meanwhile
present the maintainers of this project with your merge request to add
that metadata file.

-- 
 \   “What do religious fundamentalists and big media corporations |
  `\   have in common? They believe that they own culture, they are so |
_o__) self-righteous about it …” —Nina Paley, 2011 |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list