Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bdist gives cant copy error for package_data file which exists #341

Closed
ghost opened this issue Jan 30, 2015 · 3 comments
Closed

bdist gives cant copy error for package_data file which exists #341

ghost opened this issue Jan 30, 2015 · 3 comments

Comments

@ghost
Copy link

ghost commented Jan 30, 2015

Originally reported by: rogermarsh (Bitbucket: rogermarsh, GitHub: Unknown)


python setup.py bdist gives:

error: can't copy 'icence.txt': doesn't exist or not a regular file

where current directory is swiggedapi and licence.txt exists in this directory.

The package related arguments to setup() are:

    package_dir={'swiggedapi':''},
    packages=['swiggedapi'],
    package_data={'': ['licence.txt', '_swigged.pyd']},

@ghost
Copy link
Author

ghost commented Feb 1, 2015

Original comment by rogermarsh (Bitbucket: rogermarsh, GitHub: Unknown):


Sample project attached

@ghost
Copy link
Author

ghost commented Jan 16, 2016

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


Prefer relpath to string slicing for computing a path relative to a base. Fixes #341.

@ghost
Copy link
Author

ghost commented Jan 16, 2016

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


Although I have included a patch to avoid the off-by-one error (truncation of the first character of the filenames), the issue was encountered by the empty string in the key of package_data. According to the docs, "the value must be a mapping from package name to a list of relative path names that should be copied into the package." I suspect that the empty string isn't a valid package name.

@ghost ghost closed this as completed Mar 29, 2016
luathenalena pushed a commit to probcomp/Venturecxx that referenced this issue Jul 22, 2016
This causes issues with setuptools <= 19.3, which uses a buggy method to
get the relative paths of files [1]. The symptom is that when adding a
.vnt file in one of these directories, setup.py accidentally cuts off
the first character of the filename, then complains that it doesn't
exist. For example:

$ SKIP_PUMA_BACKEND=1 python setup.py build
running build
running build_py
error: can't copy 'backend/mite/relude.vnt': doesn't exist or not a regular file

[1]: pypa/setuptools#341
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants