python whl包不考虑模块内引用
我有一个python应用程序,其中的代码结构是/src/utility1.py、utility2.py。其中,utility2.py在utility1.py中被引用为来自utility2导入方法1、方法2的 现在,我在根文件夹中创建了一个setup.py,构建了一个whl文件,比如(main.whl),并使用pip安装了whl,直到现在一切都很好 当我从主导入实用程序1以的形式导入包时,它抛出了错误没有名为实用程序2的模块 如何解决这个问题 下面是我的setup.pypython whl包不考虑模块内引用,python,python-3.x,python-packaging,python-wheel,Python,Python 3.x,Python Packaging,Python Wheel,我有一个python应用程序,其中的代码结构是/src/utility1.py、utility2.py。其中,utility2.py在utility1.py中被引用为来自utility2导入方法1、方法2的 现在,我在根文件夹中创建了一个setup.py,构建了一个whl文件,比如(main.whl),并使用pip安装了whl,直到现在一切都很好 当我从主导入实用程序1以的形式导入包时,它抛出了错误没有名为实用程序2的模块 如何解决这个问题 下面是我的setup.py import setupt
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name= "main",
version="0.0.1",
author="abc",
author_email="abc@email.com",
description="This is test",
long_description=long_description,
long_description_content_type="text/markdown",
url="sampleurl",
packages=setuptools.find_packages(),
package_data={'main': ['*']},
include_package_data=True,
install_requires=[
'requests'
],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires='>=3.5',
)