- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在尝试使用 setup.py sdist
对我的项目进行源代码分发。我已经有了可以安装的正常运行的 setup.py
。但是当我执行 sdist
时,我得到的只是 my_project
文件夹中的另一个 my_project
文件夹,一个 MANIFEST
文件我对包含两个文本文件的 zip 文件不感兴趣,而不是我的项目。
我做错了什么? sdist
的文档在哪里?
更新:
这是我的setup.py
:
#!/usr/bin/env python
import os
from distutils.core import setup
import distutils
from general_misc import package_finder
try:
distutils.dir_util.remove_tree('build', verbose=True)
except:
pass
my_long_description = \
'''\
GarlicSim is a platform for writing, running and analyzing simulations. It can
handle any kind of simulation: Physics, game theory, epidemic spread,
electronics, etc.
'''
my_packages = package_finder.get_packages('', include_self=True,
recursive=True)
setup(
name='GarlicSim',
version='0.1',
description='A Pythonic framework for working with simulations',
author='Ram Rachum',
author_email='cool-rr@cool-rr.com',
url='http://garlicsim.org',
packages=my_packages,
package_dir={'': '..'},
license= "LGPL 2.1 License",
long_description = my_long_description,
)
try:
distutils.dir_util.remove_tree('build', verbose=True)
except:
pass
最佳答案
Tarek Ziade 在 this article 中解释了这一点以及相关的软件打包工具。 (已损坏 original link)称为用 Python 编写程序包。
基本上,它通过以下方式创建一个简单的包创建一个发布树,其中复制运行包所需的一切。然后将这棵树归档在一个或多个归档文件中(通常,它只创建一个 tar 包)。存档基本上是源代码树的副本。
关于python - `setup.py sdist` 是如何工作的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1614086/
tosca-parser 从 github 下载, 使用时 python setup.py develop ,它提示:此项目的版本控制需要 sdist tarball,或访问上游 git 存储库。所以
创建了一个安装文件。使用以下代码,其中 setup.py 为 import sys from distutils.core import setup setup( name='SomePack
我正在构建几个 Python 包,只有在所有包都已成功构建后我才想上传它们。我为每个 Python 包都有一个单独的阶段,其 sdist 被带到最后一个阶段,所有收集的 sdist 应该被上传(如果构
在构建我的包期间,我正在生成数据文件。 我想创建源代码分发 (setup.py sdist),比如如果它们最初在源代码树中,但是,我不想在源代码树中生成它们但是在其他地方(最好是构建/生成)以免弄乱我
我正在寻找一种方法来生成文件并将其包含到由 sdist/wheel 创建的包中。 是否有某种方法可以 Hook 进程来创建将在构建过程中拾取的新文件。 最佳答案 在build阶段构建文件覆盖cmdcl
我知道在 setuptools 中,如果我想指定源代码分发的创建,我只需运行: setup.py sdist 使用 formats 标志,我可以指定输出分发格式(例如 zip 和/或 tar - 请参
想要通过从我要打包的目录之外的目录运行 python setup.py sdist 来创建 python 源代码分发。似乎无法找到一种方法来做到这一点。我有一个动态生成 setup.py 和 MANI
我想将测试添加到我的 setuptools 发行版中的 sdist 包中,但我不想将它们安装在/在 bdist 中>。我已经有: setup( ... packages = find_pa
我正在尝试通过 pip(存储在 Pypi 上)交付 Django 应用程序。问题是,当我使用 pip 安装应用程序时,它不包含主要指定包内的静态文件夹。 这是我的: ├── LICENSE.txt ├
Python setuptools 可以创建源代码分发: python setup.py sdist # create a source distribution (tarball, zip file
突然间,所有 Python 包都被 pip 报告为已过期 pip list --outdated 表示[sdist],如 awscli (Current: 1.7.19 Latest: 1.7.20
我正在尝试使用 setup.py sdist 对我的项目进行源代码分发。我已经有了可以安装的正常运行的 setup.py。但是当我执行 sdist 时,我得到的只是 my_project 文件夹中的另
我要打包的项目结构如下: ├── doc │ └── source ├── src │ ├── core │ │ ├── config │ │ │ └── log.tmpl
我想在 conda 构建配方中获取 meta.yaml 的 sdist url。它需要从 URL 获取特定版本或最新版本。当我使用 CI/CD 的 Github 操作执行此操作时,我需要自动检索特定版
我是creating a Python3 application这取决于项目中的静态文件目录。 项目结构: myBlanky \__blankys \__bootstrap
有没有办法获取setup.py sdist构建的tar文件的路径?我知道它在哪里,但我希望编写脚本而不必 ls dist/ 等。如果 distutils 也分配了一个变量,我也可以覆盖命令,或者将返回
我的 MANIFEST.in 中有这个 recursive-include tables *.csv 我可以看到包含在创建的 .tar.gz 中的文件夹 /mypackage-0.0.1 /m
我一直在寻找这个问题的答案,但找不到任何人。但是在这张图片中你可以看到我的问题...... Cannot find sdist pip-*.tar.gz 但是我跟着installation guide
对于我编写的包,我完成了 python setup.py sdist bdist_wheel,它在 dist/ 目录中生成了一些包工件。现在我想在这些工件中运行包的单元测试。有什么好的方法吗? 需要说
我正在开发一个使用 namespace_packages 和 find_packages() 的 Python 包,就像在 setup.py 中一样: from setuptools import s
我是一名优秀的程序员,十分优秀!