Absolute path error when building wheel

无人久伴 提交于 2019-12-24 05:41:34

问题


OVERVIEW

I'm trying to learn how to build wheels on my windows dev box so hopefully I'll have a nice way to deploy django websites on linux boxes. But right now I'm stuck with a little error.

Here's my setup.py:

from setuptools import setup, find_packages

setup(name='pkg',
      version="1.0",
      packages=find_packages(),
      data_files=[('/etc/nginx/sites-available', ['foo.conf'])]
      )

When i try to do >python setup.py bdist_wheel I'm getting this error:

raise ValueError, "path '%s' cannot be absolute" % pathname

It seems the way I'm using data_files is not supported.

QUESTION

What's the right way to deploy config files using wheels & setup.py?


回答1:


Wheels should be used for bundling Python code. It's not for configuration management (where Nginx configurations would typically be handled).

See also: https://stackoverflow.com/a/34204582/116042



来源:https://stackoverflow.com/questions/39378247/absolute-path-error-when-building-wheel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!