How to Usefind_packages() To use thefind_packages()function in your setup file, you first need to import it from thesetuptoolspackage. Here is an example of how to usefind_packages()in a setup file: fromsetuptoolsimportsetup,find_packages setup(name='my_project',version='1.0',packages=fin...
from setuptools import setup, find_packages ImportError: No module named set wget http://peak.telecommunity.com/dist/ez_setup.py python ez_setup.py 2 ile "/usr/local/lib/python2.7/sqlite3/__init__.py", line 24, in <module> from dbapi2 import * File "/usr/local/lib/python2.7/sqlite...
"""Tests for setuptools.find_packages().""" import os import sys import shutil import tempfile import platform import pytest from setuptools import find_packages from setuptools import find_namespace_packages # modeled after CPython's test.support.can_symlink def can_symlink()...
这是一个custom discovery directive,这里使用的是pyproject.toml语法。
setup(name='my_package',packages=find_packages(),) 1. 2. 3. 4. 5. 6. 这样,find_packages函数会自动递归地搜索当前目录下的所有包,并将它们添加到打包列表中。 总结 在Python开发中,打包是一个常见的任务。使用setuptools进行打包时,我们经常会遇到setup.py packages命令打包不出文件的问题。本文介绍了解...
import setuptools setuptools.setup( name="mypypipackage", version="0.0.1", author="Example Author", author_email="author@example.com", description="A small example package", packages=setuptools.find_packages(), classifiers=[ "Programming Language :: Python :: 3", "License :: OSI Approved :...
Summary of changes Implements approach discussed in https://github.com/pypa/setuptools/pull/4389/files#r1613314607 This approach assumes that the probability of a new top-level package being added/...
└── tests setup.py importosfromsetuptoolsimportfind_packages,setup# 读取文件defread_file(filename):withopen(os.path.join(os.path.dirname(__file__),filename),encoding='utf-8')asf:long_description=f.read()returnlong_description setup(# 基本信息name="mh-test-01",# project name, global ...
Select Install as editable (-e) if you want to install the package in the editable mode (for example, setuptools develop mode). Upgrade packages If a newer version of the package is available, a link with the current version and the newest version is displayed next to the package nam...
Install as editable (-e)if you want to install a project in editable mode (for example, setuptoolsdevelop mode). Install packages from a local machine Click theAdd Packagelink on thePython Packagestoolbar and selectFrom Disk. Specify a path to the package directory or an archive (zipor...