【问题标题】:My PyPI distribution is only installing dist我的 PyPI 发行版只安装 dist
【发布时间】:2021-08-13 20:05:31
【问题描述】:

我有一个名为pyuvm 的包。源文件在pyuvm/pyuvm

当我构建它并将它发送到pypi.org 时,我没有看到任何错误,当我安装它时,我没有看到任何错误,但是site-packages 中没有pyuvm 目录有pyuvm-2.0a3.dist-info 文件。

我有这个setup.cfg

[metadata]
name = pyuvm
version = 2.0a3
author = Ray Salemi
author_email = ray@raysalemi.com
description = Python implementation of the Universal Verification Methodology (UVM) using cocotb
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/pyuvm/pyuvm
project_urls=
   Bug Tracker=https://github.com/pyuvm/pyuvm/issues
classifiers =
    Programming Language :: Python :: 3
    License :: OSI Approved :: Apache Software License
    Operating System :: OS Independent
[options]

packages = find:
python_requires = >=3.6

install_requires =
 cocotb >= 1.5.2

[options.packages.find]
where = pyuvm

知道我做错了什么吗?

【问题讨论】:

    标签: pypi


    【解决方案1】:

    我通过切换回setup.py 让它工作了

    import setuptools
    
    with open("README.md", "r", encoding="utf-8") as fh:
        long_description = fh.read()
    
    setuptools.setup(
        name="pyuvm",
        version="2.0a8",
        author="Ray Salemi",
        author_email="ray@raysalemi.com",
        description="A Python implementation of the UVM using cocotb",
        long_description=long_description,
        long_description_content_type="text/markdown",
        url="https://github.com/pyuvm/pyuvm",
        project_urls={
            "Bug Tracker": "https://github.com/pyuvm/pyuvm/issues",
        },
        classifiers=[
            "Programming Language :: Python :: 3",
            "License :: OSI Approved :: Apache Software License",
            "Operating System :: OS Independent",
            "Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
        ],
        packages=setuptools.find_packages(),
        python_requires=">=3.6",
        install_requires="cocotb>=1.5.2",
    )
    

    关键是从设置中完全删除package_dir 参数并将find_packages 设置为没有参数。

    【讨论】:

      猜你喜欢
      • 2021-04-15
      • 2011-06-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-15
      • 2021-12-18
      • 2019-10-28
      • 2013-10-21
      相关资源
      最近更新 更多