python - 将生成的轮文件复制到目标
问题描述
我有以下内容setup.py
:
"""
Based on:
https://packaging.python.org/guides/distributing-packages-using-setuptools/
https://github.com/pypa/sampleproject
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
import os
# io.open is needed for projects that support Python 2.7
# It ensures open() defaults to text mode with universal newlines,
# and accepts an argument to specify the text encoding
# Python 3 only projects can skip this import
from io import open
from ReePlexos.__version__ import ReePlexos_version
here = os.path.abspath(os.path.dirname(__file__))
base_path = os.path.join('ReePlexos')
docs_folder = os.path.join(base_path, 'docs')
packages = find_packages(exclude=['docs', 'test', 'research', 'tests'])
package_data = {}
dependencies = ["PySide2>=5.13",
"numpy>=1.14.0",
"scipy>=1.0.0",
"networkx>=2.1",
"pandas>=0.22",
"xlwt>=1.3.0",
"xlrd>=1.1.0",
"matplotlib>=2.1.1",
"qtconsole>=4.3.1",
"pyDOE>=0.3.8",
"pySOT>=0.2.1",
"openpyxl>=2.4.9",
"pulp>=1.6.8",
"smopy>=0.0.6",
"chardet>=3.0.4",
"scikit-learn>=0.18",
"geopy>=1.16",
"pytest>=3.8",
"h5py>=2.9.0",
"GridCal>=3.5.7",
"Folium",
"sphinx",
"nose",
"numba>=0.4",
"pytest",
"wheel"]
setup(
name='ReePlexos', # Required
version=ReePlexos_version, # Required
packages=packages,
include_package_data=False,
python_requires='>=3.5',
install_requires=dependencies,
package_data=package_data,
)
python3 setup.py bdist_wheel
为了创建.whl
文件,我将此设置称为。
安装程序会生成名称如ReePlexos-0.9.7-py3-none-any.whl
.
我想将生成的轮文件复制到另一个不是dist
. 我该怎么做?
解决方案
使用该--dist-dir
选项。请参阅命令的帮助消息以bdist_wheel
供参考:
$ ./setup.py bdist_wheel --help
...
--dist-dir (-d) directory to put final built distributions in
...
推荐阅读
- mysql - 无法对 JDBC 目标执行架构管理
- javascript - 尝试通过 AJAX 提交 rails 表单时出现 400 错误
- c++ - 如何使用 cpp 在 unordered_map 中分配 lambda 函数?
- linq - 当我从 Azure 函数而不是控制台应用程序运行 LINQ 查询时失败
- apache-spark - 修复 Spark 结构化流中的检查点
- python - 如何按两个字段分组并按日期时间排序?
- mod-rewrite - RewriteRule 否定(NOT)不起作用
- ios - 如何持久化 tableview 行?
- python - 如何使数据类更好地与 __slots__ 一起工作?
- c# - 在 C# mysql 中读取 mediumblob