naming packages for pypi

A

Aljosa Mohorovic

is it possible to have 2 packages with same name registered at pypi?
are packages unique per name or also per category or something else?

if package is unique per name how do you name you packages?
do you name them something like <project1>-myapp, <project2>-myapp,
<projectN>-myapp, ...

if this is current situation is this something that you learned to
live with and there are no indications that this will eventually
change?

Aljosa Mohorovic
 
C

Chris Rebert

is it possible to have 2 packages with same name registered at pypi?
are packages unique per name or also per category or something else?

if package is unique per name how do you name you packages?
do you name them something like <project1>-myapp, <project2>-myapp,
<projectN>-myapp, ...

if this is current situation is this something that you learned to
live with and there are no indications that this will eventually
change?

IIRC, packages support nesting, so just do that instead. Simply put
project1..projectN into a "myapp" package and put "myapp" on PyPI.

Cheers,
Chris
 
C

Carl Banks

is it possible to have 2 packages with same name registered at pypi?
are packages unique per name or also per category or something else?

if package is unique per name how do you name you packages?
do you name them something like <project1>-myapp, <project2>-myapp,
<projectN>-myapp, ...

if this is current situation is this something that you learned to
live with and there are no indications that this will eventually
change?

First off, we need to distinguish between software package (a bunch of
software and other data distributed together) and Python package (a
hierarchical collection of python modules). Furthermore some Python
packages are top-level packages, others are subpackages.

Your post seems to suggest some conflating of these concepts so you
need to make it clear what you really mean.

Usually one PyPI entry corresponds to one software package which
contains one unique top level package (which can in turn contain many
subpackages), but that's not always the case.

The main restriction is that a given top-level package may not appear
in more than one PyPI entry. Top-level package names are unique.
(That is, unless workarounds, such as customizing the installation,
are employed.)


Carl Banks
 
A

Aljosa Mohorovic

Your post seems to suggest some conflating of these concepts so you
need to make it clear what you really mean.

my example:
when creating website example.com (django project) it contains
multiple django apps which i package separately.
most of websites have news, about, contact so i would create 3
packages news, about and contact and add them to pypi.example.com
(private pypi for my company).
same thing happens for site example2.com, example3.com so finally i
have something like:
example.com-news # news package for project/site example.com
example2.com-news # news package for project/site example2.com
example3.com-news # news package for project/site example3.com

i'm trying to find a better way, currently it looks to me like
packaging system is missing namespaces/categories or something similar
but i'm guessing it's only that i don't know how to do it properly.
that's why i'm asking so please suggest a proper way for me to do it.

Aljosa Mohorovic
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top