'无效的模块名称'使用setuptools创建包

时间:2016-04-13 12:32:31

标签: python setuptools

我有一个包含以下内容的项目:

proj
├── proj
│   ├── scriptA.py
│   ├── scriptB.py
│   └── __init__.py
├── LICENCE
├── README.md
└── setup.py

我正在关注this guide将此项目打包为PiPY。 setup.py文件如下所示:

#!/usr/bin/python3
# coding=utf8

from setuptools import setup

setup(
    name = "proj",
    version = "0.2",
    packages = ['proj'],
    install_requires=[],
    entry_points={
        'console_scripts': [
            'scriptA=proj:scriptA',
            'scriptB=proj:scriptB'
        ],
    },

    # metadata for upload to PyPI
    author = "Luís",
    author_email = "luis@mail.com",
    description = "Some package",
    license = "EUPL v1.1",
    keywords = "pip package",
    url = "https://some.place.com",   # project home page, if any
    classifiers = [
        "Programming Language :: Python",
        "Programming Language :: Python :: 3",
        "Development Status :: 4 - Beta",
        "Environment :: Console",
        "Intended Audience :: Science/Research",
        "License :: OSI Approved :: European Union Public Licence 1.1 (EUPL 1.1)",
        "Operating System :: OS Independent",
        "Topic :: Scientific/Engineering :: GIS"
        ],


    # could also include long_description, download_url, classifiers, etc.
)

当我尝试构建时,我收到以下错误:

$ python setup.py bdist_wheel --universal
error in proj setup command: ('Invalid module name', 'proj')

我做错了什么?

1 个答案:

答案 0 :(得分:0)

如果我直接调用setup.py

,构建就会成功

$ python3 setup.py bdist_wheel --universal

$(document).on("pagecreate","#page1", function(){ $( "#thelist" ).on( "filterablefilter", function( event, ui ) { $("#thelist li").removeClass('ui-li-static ui-body-inherit'); }); $("#thelist li").removeClass('ui-li-static ui-body-inherit'); }); 中的shebang由于某种原因被忽略了。

但是,生成的包fails to run after being installed