-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
good first issueeasy issue that is friendly to new contributoreasy issue that is friendly to new contributortype: bugproblem that needs to be addressedproblem that needs to be addressed
Description
From here: https://svn.python.org/projects/sandbox/trunk/setuptools/doc/formats.txt
The filenames always use
/as a path separator, which must be
converted back to a platform-specific path whenever they are read.
My SOURCES.txt has / even on Windows.
Now loo0k at _pytest/config.py:1034
metadata_files = 'RECORD', 'SOURCES.txt'
package_files = (
entry.split(',')[0]
for entrypoint in pkg_resources.iter_entry_points('pytest11')
for metadata in metadata_files
for entry in entrypoint.dist._get_metadata(metadata)
)
for fn in package_files:
is_simple_module = os.sep not in fn and fn.endswith('.py') # LOOK HERE !!!!
is_package = fn.count(os.sep) == 1 and fn.endswith('__init__.py')
if is_simple_module:
module_name, ext = os.path.splitext(fn)
hook.mark_rewrite(module_name)
elif is_package:
package_name = os.path.dirname(fn)
hook.mark_rewrite(package_name)
os.sep should not be used here. It leads to errors like one module is considered to be is_simple_module on **nix, but not on Windows.
Metadata
Metadata
Assignees
Labels
good first issueeasy issue that is friendly to new contributoreasy issue that is friendly to new contributortype: bugproblem that needs to be addressedproblem that needs to be addressed