![](/img/trans.png)
[英]python setup.py egg_info failed when installing python-bioformats
[英]How to configure setup.py to distribute egg
首先,我的目標是與已經安裝了 Java JRE 的非計算機極客分享這種最簡單的方法。
我將 Netbeans 與 Python 和 Jython 插件一起使用。 我開始了一個Python 項目並編寫了我的代碼。 我導入標准的 JAVA 包和只有一個 Java 插件
導入 gnu.io
import gnu.io.RXTXPort as RXTX RXTX 添加到 JDK/JRE 和 JRE 我假設這將是一個依賴項
該程序在 Netbeans 中運行良好,現在我想做一個雞蛋。 項目 SRC 文件夾包含 29.py + 25.class + 7.jpg + 2.XML 文件和 __ INIT __.py
我右鍵單擊該項目並使用 CLEAN 和 BUILD EGG 這會將 setup.py 文件放在源目錄中並創建一個 build 和 info 文件夾。 我還從項目 SRC 文件夾 jython setup.py bdist_egg 中發出了 Jython 命令
兩種方法都運行完成並產生以下內容
文件夾構建
-------- 子文件夾 bdist.java1.80_251 -- 為空
文件夾范圍
------- 文件 JythonProject0.1-py2.7.egg -- 內容 = egg-info 文件列表
文件夾 JythonProject.egg-info 與
------ 文件dependency_links.txt -- 無內容
------ 文件 PKG-INFO -- setup.py 條目的摘要
------ 文件 SOURCES.txt -- setup.py + 這些文件的列表
------ 文件 top_level.txt -- 沒有內容
我已經研究過 setup.py 文件的結構,但我承認,如果沒有示例,我會對填充空白的語法感到困惑。
問題:如何添加我的源數據以獲得工作雞蛋?
Setup.py =
from setuptools import setup, find_packages
setup
name='JythonProject'
version='0.1'
packages=find_packages() **supposed to find all .PY files ?**
**how to include CLASS files?**
# Declare your packages' dependencies here, for eg:
install_requires=[] **my RXTX? path/xx.JAR?**
# Fill in these to make your Egg ready for upload to
# PyPI
author='jwkel'
author_email='email@gmail.com'
#summary = 'Just another Python package for the cheese shop'
url='' **none**
license='' **I understand this**
long_description='Long description of the package'
我需要將 setup.py 文件移動到根目錄(與源文件不在同一個文件夾中。),事情開始發生。 從那里警告指導我的行動。 這是我的 setup.py,它給了我我的第一個結果。 現在學習 rst 和 MD,這樣我就可以添加一個 README 文件。
from setuptools import setup, find_packages
setup (
name='JythonProject',
version='0.1',
zip_safe=True,
packages=find_packages(),
# Declare your packages' dependencies here, for eg:
install_requires=[],
data_files=[('',['src/cars_pic.jpg','src/rfid_pic.jpg','src/readers_pic.jpg','src/polling_pic.jpg','src/mode_pic.jpg','src/locations_pic.jpg','src/engine_pic.jpg','src/RFIDconfig.xml','src/JMRIimportedData.xml'])],
# Fill in these to make your Egg ready for upload to
# PyPI
author='James w Kelly',
author_email='jwkelly49@gmail.com',
#summary = 'Just another Python package for the cheese shop',
url='',
license='MIT',
long_description='Long description of the package',
# could also include long_description, download_url, classifiers, etc.
)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.