Re: pip install very slow
Stuart McGraw <[email protected]> Sun, 28 Jun 2020 09:20:59 -0600
| Newsgroups | gmane.comp.python.distutils.devel |
|---|---|
| Message-ID | <[email protected]> |
Yes, that does seems to be the problem. For now I was able move the large directory out of the project directory and put a symlink in the project directory pointing to it. It appears that pip/setuptools doesn't follow symlinks thankfully. Not ideal but workable for now. On 6/25/20 2:58 PM, Bernát Gábor wrote: > See https://github.com/pypa/pip/issues/7555 for details on this. > > Stuart McGraw <[email protected]> wrote: > > Hello, > > First time trying to use Python's package tools and I'm attempting to use pip to install from a local project: > > python3 -m pip install --user --upgrade --no-deps ./ > > I have a simple directory structure very similar to that recommended in https://packaging.python.org/tutorials/packaging-projects/ > > project/ > data/ > mypackage/ > __init__.py > data/ > *.csv > module1.py > module2.py > tmpl/ > *.jinja > setup.py > > The project/data/ directory contains several GB of stuff I use during development. It is not supposed to be part of the package and it is not mentioned in setup.py. > > The problem is when I run the install command above it takes many minutes to finish. When I move the project/data/ sub-directory out of the project/ directory, it takes a few seconds. > > I thought perhaps that "packages=setuptools.find_packages()" in my setup.py file might be the culprit but replacing in with "packages=['mypackage']" made no difference. > > I'm not sure why pip seems to be roaming through project/data/ (if that's what's happening) but is there some way to get it not to? My apologies if this is covered in the docs somewhere; I'm still going though them but didn't see anything with an initial scan. > > If it helps, here is my setup.py file: > > setuptools.setup ( > name="mypackage", > version="...", > author="Me", > author_email="...", > description="...", > long_description="...", > long_description_content_type="text/markdown", > url="...", > packages=['mypackage'], > package_data={'mypackage': ['data/*.csv', 'tmpl/*.jinja',]}, > zip_safe = False, > classifiers=[...], > python_requires='>=3.6', > install_requires = ['jinja2',], ) > > Thanks for any enlightenment. -- Distutils-SIG mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/distutils-sig.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/HUD2CORKFT3P3MIVOHZZWXN5GBUD3PBE/