Python 3.x Setup.py安装不';你不能按预期工作吗???还是这样?

Python 3.x Setup.py安装不';你不能按预期工作吗???还是这样?,python-3.x,setuptools,setup.py,Python 3.x,Setuptools,Setup.py,因此,我用Python编写了一个具有以下结构的程序: project/ | doc/ | project/ | __init__.py | other packages | tests | __init__.py | other test files | | AllTest.py | README | License | setup.py 我的setup.py文件如下所示: from setuptools import setu

因此,我用Python编写了一个具有以下结构的程序:

project/
 | doc/
 | project/
    | __init__.py
    | other packages
    | tests
       | __init__.py
       | other test files
 |
 | AllTest.py
 | README
 | License
 | setup.py
我的
setup.py
文件如下所示:

from setuptools import setup, find_packages
import sys


# dependencies
INSTALL_REQUIRES = ['numpy>1.0.0',
                    'matplotlib',
                    'scipy'
                ]


setup(name='project',
      version='0.9',
      author='Some Author',
      description = ("Working Project for claculating something"),
      packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
      install_requires=INSTALL_REQUIRES,
      test_suite="AllTest.py",
     )    
我的
AllTest.py
如下所示:

import unittest

# run all tests in current dir matching the pattern
#if __name__ == "__main__":
def additional_tests():
    return unittest.TestLoader().discover('project/test', pattern='*.py')
我的问题是:如果我在driectory中运行
python setup.py install
,我就有了我的项目和
setup.py
文件,一个新的目录
build
被创建,其中包含了我的所有文件。在我的
\Python3.x\Lib\site包中
只是一个创建的
.egg
文件,
.egg
文件包含我的项目的
.zip
文件


我不确定这是否就是必须要做的全部,或者我犯了一些错误。

一旦安装了它,您能在Python 3解释器中导入项目吗?我发现这是一个有用的介绍,让项目设置正确:是的,这工作刚刚好。感谢您的教程,这对我帮助很大,因为我对python和setup.py还很陌生。那么为什么您认为会有问题呢?我不知道如何验证我的setup.py安装是否达到了我的要求。再次感谢