Cannot copy "ANIFEST.in": regular file does not exist or not

NOTE. . Since September 4, 2015, I can no longer reproduce this problem using the current versions of python and setuptools / distutils, either in python 2 or 3.


NOTE. I myself answered this question and will accept the answer as soon as the system allows me, but it will be the only copy of the English-language link to the problem on the Internet (according to google), so I thought that I would send both in the hope that it might be useful.


I had a problem that I found impossible to debug when installing my own python package. This is a very simple package with a flat structure (without subdirectories) and several data files that I need to copy during installation. With a few abbreviations for brevity, I have the following:

spherical_functions
├── MANIFEST.in
├── __init__.py
├── spherical_functions.py
├── ladder_operator_coefficients.npy
└── setup.py

When installing from the source directory, I have no problem. But when I either switched to setuptoolsor installed with pip(which is necessary for distribution), I get an error

can't copy 'ANIFEST.in': doesn't exist or not a regular file

M . distutils, , ANIFEST.in, . , , setuptools , .

MANIFEST.in, package_data setup, ,

error: can't copy 'adder_operator_coefficients.npy': doesn't exist or not a regular file
+4
2

, , ; setup setup.py.

package_dir={'spherical_functions': ''},

package_dir={'spherical_functions': '.'},

( .) , , .

, , setuptools / distutils. , , , , - , ...

+3

, py_modules setup(), () , . python.

setup(...
      py_modules=['spherical_functions'],
      ...)

, from spherical_functions import <a_member_inside_that_file>.

0

All Articles