Support for environment markers for data_files
Aluriak opened this issue · 1 comments
Aluriak commented
Environment markers are supported by #1520. However, with the following lines in my setup.cfg:
[options.data_files]
bin =
bin/linux/mybin; platform_system=="Linux"
bin/macos/mybin; platform_system=="Darwin"
bin/win/mybin.exe; platform_system=="Windows"
And the following package tree:
.
├── mypackage
│ └── __init__.py
├── MANIFEST.in
├── README.mkd
├── setup.cfg
└── setup.py
├── bin
├── linux
│ └── mybin
├── macos
│ └── mybin
└── win
└── mybin.exe
My goal is simply to provide in the path of user a binary, which is already compiled for the 3 main platforms (linux, mac, windows).
When running python setup.py install
, i get the following last lines:
running build_py
installing package data to build/bdist.linux-x86_64/egg
running install_data
error: can't copy 'bin/linux/mybin; platform_system=="Linux"': doesn't exist or not a regular file
I tried to use the setup.py
instead of setup.cfg
, getting the same error:
setup(
data_files=[
('/bin', [
'bin/linux/mybin; platform_system=="Linux"',
'bin/macos/mybin; platform_system=="Darwin"',
'bin/win/mybin.exe; platform_system=="Windows"'
]),
]
)
What am i missing ?
Python 3.6.6
>>> import setuptools as s
>>> s.__version__
'40.8.0'
benoit-pierre commented
There's nothing about environment markers in #1520 or in setuptools' documentation for data_files
. They are unsupported.