建筑轮时绝对路径错误 [英] Absolute path error when building wheel

查看:175
本文介绍了建筑轮时绝对路径错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

概述

我正在尝试学习如何在我的Windows开发框上构建轮子,希望我会有一个很好的方式在linux盒子上部署django网站。但是现在我有一个错误。

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.

这是我的setup.py:

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'])]
      )

当我尝试做> python setup.py bdist_wheel 我收到这个错误:

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

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

似乎我使用的方式是data_files不支持。

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

QUESTION

使用 wheel & setup.py

推荐答案

轮应用于捆绑Python代码。它不是配置管理(通常会处理Nginx配置)。

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

另请参见: https://stackoverflow.com/a/34204582/116042

这篇关于建筑轮时绝对路径错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆