0
私のsetup.pyの見た目に欠かせないものがあります。私は多くの、多くの微調整を試みたが役に立たなかった。私はちょうど単一のモジュールのためのインストーラをやっているので、pacakges = ['foo']
の代わりにpy_module = ['foo']
を使用することにしました。私は、と追加のrss_parse
サブディレクトリも試しましたが、サイコロはまだありません。明らかに、私が誤解しているか、まったく見逃していたドキュメントのものがあります。私の(最初の)setup.py - Python 3.4の基本的なものがありません
ディレクトリ:
~/rss_parse
|- __init__.py
|- README.md
|- rss_parse.py
|- setup.py
setup.py:
from setuptools import setup
setup(name = 'rss_parse',
version ='0.1.0b1',
description ='RSS feed parser: Takes a URL and configuration dict and '
'returns an iterable object containing feed `<items>`',
long_description = open('README.md', 'r').read(),
author = 'Alastair',
author_email = '[email protected]',
url = 'https://github.com/dev-dull/rss_parse',
license = 'MIT',
py_module = ['rss_parse'],
install_requires = ['arrow', 'lxml'],
classifiers = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Topic :: Software Development :: RSS and Atom feed parsing.',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.4',
],
keywords = 'RSS parser xml news Atom feed',
)
がを取り付ける:
[email protected]:~/rss_parse$ python3 setup.py install --user
試験:
[email protected]:~/rss_parse$ cd ~/Desktop # make sure python3 doesn't find it in ./
[email protected]:~/Desktop$ python3
>>> import rss_parse
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'rss_parse'