pypi

packaging common python namespaces

◇◆丶佛笑我妖孽 提交于 2019-11-29 21:05:48
I'm looking to package and upload a library I have to PyPI in the next few days, but I'm a little unsure about my approach to the namespace. I have a few otherwise unrelated projects with a similar approach and wanted to give them all the same namespace. For example: Library 1 namespace: abc.seo Library 2 namespace: abc.ajax Library 3 namespace: abc.ecommerce etc The problem is that I'm not sure if it's possible for two separate packages (eg eggs) to co-exist with the same parent namespace. Is this approach problematic, or is there a way around it? What's the best approach? The libraries

pypi UserWarning: Unknown distribution option: 'install_requires'

允我心安 提交于 2019-11-29 20:47:35
Does anybody encounter this warning when executing python setup.py install of a PyPI package? install_requires defines what the package requires. A lot of PyPI packages have this option. How can it be an "unknown distribution option"? Sebastian Blask python setup.py uses distutils which doesn't support install_requires. setuptools does, also distribute (its successor), and pip (which uses either) do. But you actually have to use them. I.e. call setuptools through the easy_install command or pip install . Another way is to import setup from setuptools in your setup.py, but this not standard and

Have the same README both in Markdown and reStructuredText

强颜欢笑 提交于 2019-11-29 18:45:33
I have a project hosted on GitHub. For this I have written my README using the Markdown syntax in order to have it nicely formatted on GitHub. As my project is in Python I also plan to upload it to PyPi . The syntax used for READMEs on PyPi is reStructuredText. I would like to avoid having to handle two READMEs containing roughly the same content; so I searched for a markdown to RST (or the other way around) translator, but couldn't find any. The other solution I see is to perform a markdown/HTML and then a HTML/RST translation. I found some ressources for this here and here so I guess it

FileNotFoundError: [Errno 2] when packaging for PyPI

拟墨画扇 提交于 2019-11-29 16:15:25
I have uploaded a simple python package in https://test.pypi.org . When I download this with pip and try yo run I get FileNotFoundError: [Errno 2] File b'data/spam_collection.csv' does not exist: b'data/spam_collection.csv' . Earlier I had issues with uploading the csv file when packaging. See my question in Could not upload csv file to test.pypi.org . Now after installing the package with pip I run pip show -f bigramspamclassifier . I get the csv file listed. Therefore, I believe the file has been uploaded. I think the issue is with reading the file in my python file in the package. What

Specifying optional dependencies in pypi python setup.py

家住魔仙堡 提交于 2019-11-29 16:04:28
问题 How do I specify optional dependencies in python's setup.py ? Here's my stab at specifying an optional dependency for an open source library of mine but it doesn't seem to do much. https://github.com/od-eon/django-cherrypy/blob/master/setup.py Specifically extra_requires in this snippet: setup( name='django-cherrypy', version='0.1', packages=packages, license='LICENSE', description='cherrypy, running under django', long_description=open('README.md').read(), author='Calvin Cheng', author_email

Number of installations statistics for PyPI packages?

孤人 提交于 2019-11-29 12:23:37
问题 I've got a couple of packages on the Python Package Index (PyPI) now. Is there any way to get hold of statistics as to how many times they have been downloaded (either manually or via easy_install or pip ? Or, alternatively, how many views the main package page has received? 回答1: UPDATE 2: it's back! There's now a "Downloads (All Versions)" just after the list of downloads (below the user-supplied docs). announcement at http://mail.python.org/pipermail/distutils-sig/2013-June/021344.html - it

Using an extra python package index url with setup.py

浪子不回头ぞ 提交于 2019-11-29 10:47:30
问题 Is there a way to use an extra python package index (ala pip --extra-index-url pypi.example.org mypackage ) with setup.py so that running python setup.py install can find the packages hosted on pypi.example.org ? 回答1: If you're the package maintainer, and you want to host one or more dependencies for your package somewhere other than PyPi, you can use the dependency_links option of setuptools in your distribution's setup.py file. This allows you to provide an explicit location where your

python easy_install fails with SSL certificate error for all packages

為{幸葍}努か 提交于 2019-11-29 09:23:51
Goal: I'm on RedHat 5 and trying to install the latest python and django for a web app. I successfully altinstalled python27 and easy_install, and wget with openssl. Problem: However now that I try to get anything from pypi.python.org I get the following error: $ sudo easy_install --verbose django Searching for django Reading https://pypi.python.org/simple/django/ Download error on https://pypi.python.org/simple/django/: [Errno 1] _ssl.c:507: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed -- Some packages may not be found! Couldn't find index page for 'django

Using hyphen/dash in python repository name and package name

大城市里の小女人 提交于 2019-11-29 08:17:18
I am trying to make my git repository pip-installable. In preparation for that I am restructuring the repo to follow the right conventions. My understanding from looking at other repositories is that I should put all my source code in a package that has the same name as the repository name. E.g. if my repository is called myrepo , then the source code would all go into a package also called myrepo . My repository has a hyphen in it for readability: e.g. my-repo . So if I wanted to make a package for it with the same name, it would have a hyphen in it as well. In this tutorial it says "don't

Does conda update packages from pypi installed using pip install?

隐身守侯 提交于 2019-11-29 07:14:56
I use Anaconda (because it is awesome), and the packages available through conda install are quite extensive . However now and then I do need to install a package that isn't available in the conda repositories, and so get it from pypi instead . My question: when I run the command conda update --all , will conda also update these pypi packages? Or do I have to update them separately? The conda docs don't seem to contain an answer to this. This question and answer seems to indicate that no, conda does not manage pypi packages, but I'm still uncertain. No, conda update and conda install don't