New submission from jt <jonas@thiem.email>:

I find the following doc section found at 
https://docs.python.org/3.7/distutils/setupscript.html#installing-additional-files
 about data_files somewhat unclear:

```
setup(...,
      data_files=[('bitmaps', ['bm/b1.gif', 'bm/b2.gif']),
                  ('config', ['cfg/data.cfg']),
                  ('/etc/init.d', ['init-script'])]
     )

Each (directory, files) pair in the sequence specifies the installation 
directory and the files to install there.

...

The directory should be a relative path. It is interpreted relative to the 
installation prefix (Python’s sys.prefix for system installations; 
site.USER_BASE for user installations).
```

This gives me no clue what the installation actually is relative to, since e.g. 
sys.prefix is just `/usr` - surely I'm not supposed to specify 
"lib64/python3.7/site-packages/<mypackage-name>/file" as a target?

That is probably not how that text is supposed to be read and I'm sure 
packaging expert understand what sort of prefix is actually meant, but could 
this be more elaborated on, maybe an actual example for a fake package of 
whether this is e.g. the package folder root after the install inside the site 
packages, or the site packages folder itself, or ...?

----------
assignee: docs@python
components: Documentation
messages: 337471
nosy: docs@python, jt
priority: normal
severity: normal
status: open
title: data_files / Install Additional Files written unclearly such that it's 
not obvious what parameter is what
versions: Python 3.7

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

Reply via email to