Python项目发布脚本 [英] Python Project Publish Scripts

查看:62
本文介绍了Python项目发布脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Python项目,它是构建WPF应用程序的更大解决方案的一部分。我使用这个项目来调试/测试python代码。从WPF应用程序调用相同的代码,我将脚本作为应用程序的一部分进行部署。



我的问题是我觉得我错过了一个关于如何部署这些脚本 - 例如调试我的应用程序时。 Python项目支持Publish选项。但是,这似乎只发布到一个位置,它似乎不支持
相对路径或参数。我想要做的是根据构建目标将脚本文件重新发布到调试或发布文件夹。



我想做xcopy或类似的。但是,因为它是一个Python项目,所以没有构建选项。那么,是否支持后期制作目标?如果是这样,他们什么时候被调用?它只发生在重建吗?如果是这样,那就太痛苦了。

解决方案

Hi Max,


欢迎来到MSDN论坛。


请参阅您的描述,您的问题是关于Python开发。由于我们的论坛是讨论VS IDE,请重定向到这个适当的论坛:
https://github.com/Microsoft / PTVS /问题并开始一个新问题以获得更好的支持,感谢您的理解。



最好的问候,


Sara


I have a Python project that is part of a larger solution that builds a WPF application. I use this project to debug/test the python code. This same code is called from the WPF application and I deploy the scripts as part of the application.

My problem is that I feel I'm missing a trick on how to deploy these scripts - e.g. when debugging my application. There is a Publish option supported by the Python project. However, this only appears to publishes to one location, it doesn't appear to support relative paths or parameters. What I'd like to do is to republish the script files to a debug or release folder, based on the build target.

I thought about doing an xcopy or similar. However, because it's a Python project, there is no build option. So, are post build targets supported? If so, when are they invoked? Does it only happen on a rebuild? If so, that's a pain.

解决方案

Hi Max,

Welcome to the MSDN forum.

Refer to your description, your issue is about Python development. Since our forum is to discuss the VS IDE, please redirect to this appropriate forum: https://github.com/Microsoft/PTVS/issues and start a new issue for a better support, thank you for your understanding.

Best regards,

Sara


这篇关于Python项目发布脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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