ostrokach ostrokach - 1 month ago 11
Python Question

Python setup.py develop stuck at "writing dependency_links"

I am trying to run

python setup.py develop
on a package that contains some helper scripts.

The package is structured as follows:

mytools
|--mytools
|--tests
|--notebooks
|--xxx
|--yyy
|--zzz


The
setup.py
file is as follows:

from setuptools import setup

setup(
name='mytools',
version='0.0.1',
packages=['mytools'],
)


Running
python setup.py develop
produces the following output:

running develop
running egg_info
writing mytools.egg-info/PKG-INFO
writing top-level names to mytools.egg-info/top_level.txt
writing dependency_links to mytools.egg-info/dependency_links.txt


The problem is that the build appears to hang at the last line. It is doing a lot of I/O, but I don't know why? Some of the other folders in the package root directory (i.e.
tests
,
notebooks
,
xxx
,
yyy
,
zzz
) contain many small and big files
, but I don't want the install script to think about them (hence
packages=['mytools']
).

Any suggestions?

Edit:

1) Versions:

Python: 3.5.1
setuptools: 23.0.0


2) After moving all subfolders except
mytools
,
python setup.py develop
works as expected. However, I would like to keep everything in one place.

Answer

This was a bug in setuptools (see #249, #450).

setuptools would first create a list of all files in the project directory, and would then filter that list to only include files specified in packages, package_data, MANIFEST.in, etc.

This has been addressed with pull requests #610 and #764, and as of setuptools==28.5.0 is no longer a problem.