Pip django app安装

时间:2014-06-12 21:30:07

标签: python django pip

我目前正在制作一个内部广告管理器作为django应用!它被称为" glinks"这基本上意味着图形链接。有点有道理我猜。我想通过pip使它可用,所以我完成了所有步骤,现在可以在这里找到它:

https://pypi.python.org/pypi/django-glinks/

出于某种原因,当我直接从页面上的tar文件安装它时,我得到了正确的文件夹/文件结构。

django-glinks
  *files needed
    glinks
      *files needed
        templatetags
          *files needed

BUT!当我使用pip install django-glinks时,我没有得到templatetags目录或文件!所以我得到了这个:

django-glinks
  *files needed
    glinks
      *files needed

我对此很陌生,所以如果有人可以帮助我,那将会很棒。这是我的setup.py文件:

from distutils.core import setup
import os

README = open(os.path.join(os.path.dirname(__file__), 'README.txt')).read()

# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))

    setup(
        name='django-glinks',
        version='0.1.4',
        author='Shawn Simon',
        author_email='shawn.simon.developer@gmail.com',
        packages=['glinks'],
        url='http://pypi.python.org/pypi/django-glinks/',
        license='LICENSE.txt',
        description='Interal add manager for django sites.',
        long_description=open('README.txt').read(),
        install_requires=[
            "Django >= 1.6.0",
        ],
        classifiers=[
            'Environment :: Web Environment',
            'Framework :: Django',
            'Intended Audience :: Developers',
            'License :: OSI Approved :: BSD License', # example license
            'Operating System :: OS Independent',
            'Programming Language :: Python',
            'Programming Language :: Python :: 2.7',
            'Topic :: Internet :: WWW/HTTP',
            'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
        ],
    )

这是我的manafest.in:

include *.txt
recursive-include docs *.txt
recursive-include docs *.py
recursive-include docs *.rst
recursive-include docs Makefile
recursive-include pypiuploader *.py
recursive-include tests *.py
include glinks/templatetags/*.py
include *.py

1 个答案:

答案 0 :(得分:2)

更正setup - 完成packages var

你好setup.py。它缺少对glingks.templatetags包的引用。

如果您将此软件包添加到packages,如下所示,它将起作用。对我来说,我在修改之后不仅glinks,而且还glinks.templatetags

setup(
    name='django-glinks',
    version='0.1.4',
    author='Shawn Simon',
    author_email='shawn.simon.developer@gmail.com',
    packages=['glinks', "glinks.templatetags"],
    url='http://pypi.python.org/pypi/django-glinks/',
    license='LICENSE.txt',
    description='Interal add manager for django sites.',
    long_description=open('README.txt').read(),
    install_requires=[
        "Django >= 1.6.0",
    ],
    classifiers=[
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License', # example license
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.7',
        'Topic :: Internet :: WWW/HTTP',
        'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
    ],
)