New submission from Michael Mulich <michael.mul...@gmail.com>:

A package's metadata (dist-info) should be available to it while running the 
test command (pysetup run test)?

The use case:

I've written a test for a function that is supposed to find the default 
configuration or one provided in a users local area (or {userbase} as sysconfig 
puts it). As part of the test, I'm ensuring that the forcibly found default 
config is loaded correctly. The function that finds the configuration uses 
sysconfig paths (sysconfig.get_paths) which rely on the packaging database (PEP 
376 API now in packaging.database).

To find the default config, or resource in packaging terms, I'm using the 
packaging.database.get_file_path, which requires the distribution metadata 
(dist-info) be available within the Python path, because it must lookup the 
RESOURCES file.

I've started work, in my local clone. We lack a unittest for this case. I'll be 
writing it some time within the next few days.

I'd like to know where this RESOURCES file came from? I don't recall, nor see 
mention of it in PEP 376. I would also have expected to find something in 
packaging.command.install_distinfo command related to this file. The 
install_distinfo command is lacking this logic. I'll add it after the first 
half of this case working.

----------
assignee: tarek
components: Distutils2
messages: 138032
nosy: alexis, eric.araujo, michael.mulich, tarek
priority: normal
severity: normal
status: open
title: pysetup run test
type: behavior
versions: Python 3.3

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12302>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to