-
-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Package naming policies #18
Comments
Question: both pip and conda are case insensitive, but PyPI allows for mixed case names on the web. Should we do as anaconda does and keep everything lower case? |
Question: How to resolve a package name dispute (to avoid name squatters)? If a discussion cannot resolve the naming we should stick with rule (1). |
Only for python, for r use At some point, there will also be subpackages naming (e.g.
My vote: All lower... |
Thanks guys. Great start! @ocefpaf - is there an oracle somewhere in the Deb/Fed world on this kind of thing. If I'm honest, I'd personally prefer to follow their naming convention than Anaconda's... Everything you've said so far makes a lot of sense to me. At the risk of pulling in too many chefs for Github's linear issues (at which point we should probably drop out to the conda-forge mailing list), I'd love to hear the opinions of @ericdill, @rmcgibbo and @mwcraig (and anybody else with experience in this realm). |
debian: https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Source
There is also the python policy: https://www.debian.org/doc/packaging-manuals/python-policy/ch-module_packages.html#s-package_names
|
@JanSchulz posted: seems reasonable, let's just adopt it. Python packages should mirror the name on pypi whenever possible, and the actual python package name if there is no py_py name. [no idea why continuum did what it did with beautiful soup, but what can we do?) Python bindings to a c lib should be called py_the_lib_name, unless it already has another name on pypi. c libs should be called lib[the lib name]
And Hey! I just noticed that we're maintaining a "beutifulsoup4" package -- making @ocefpaf 's point! As for GDAL -- that's a mess -- it's great that the GDAL project provided python bindings, but having them built and installed at at once has been a pain for ages (and not just with conda) And continuum has now split them off, which is good, but they are stuck with the old naming (bad). So let's try not to do that. There are times when multiple things are in one source repo that really should be multiple packages -- so let's keep it that way when we can. We should put this in a doc somewhere, that we can all edit, rather than this linear discussion... In the end, "A foolish consistency is the hobgoblin of little minds" -- so let's establish some default standards, and then not get too uptight about it. |
👍 for that. Who doesn't have access to the wiki on this repo that would like it? That would seem an obvious first place for the content. |
I would be very much for a md document in this repo which gets built into the website. PRs and the possibility to comment and repush are IMO better than wiki style changes... |
@JanSchulz: yeah the end goal is probably user-readable docs, so that's a good idea. However, right now the .io site is static html -- is is possible to mix that with Jekyll (Or sphinx?)? If the longer term goal is a Jekyll site, then starting with .md in the wiki is not so bad.... |
@ChrisBarker-NOAA My (limited but usually bad) experience with discussion around wiki docs tells me to go with a simple md doc in the repo and simply link to the repo from the html files :-) Comments are much better here... |
"conda name = pypi name" is also great for this:
|
[BTW, it would be really great if conda had a way to submit the pip names and get conda names back...] |
I'm not sure what you mean here -- could you clarify? On Feb 13, 2016, at 4:21 AM, Jan Schulz notifications@github.com wrote: [BTW, it would be really great if conda had a way to submit the pip names — |
@ChrisBarker-NOAA I'm no sure how many packages do have different names than the original pypi package, but there is probably are a few. If tehre would be a function which returned the pip package names as conda package names, then specifying the package dependencies could be as simple as
Or even easier:
...but I should probably take this to the conda-build repo... |
hmm, handy, yes -- where would that code go? in conda? a totally separate I suppose a conda recipe could have a field in it for the the original pip -CHB On Sat, Feb 13, 2016 at 11:56 AM, Jan Schulz notifications@github.com
Christopher Barker, Ph.D. Emergency Response Division |
It needs changes in conda, and conda build as this field needs to be included in the index. |
Recently we named the module We should add a rule to always disambiguate package names by adding the prefix |
I' a bit confused. We need a "Python name" for Python packages that wrap c libs, but use the same name on PyPi. But it looks like cobra ( also referred to as "cobrapy" requires libgplk, and is called "cobra" on PyPi. So why a new name? Anyway, for those cases where we do need to disambiguate between c libs and Python wrappers, yes, a consistent naming scheme is good. I would prefer "py_libname", but python_libname is fine, too. (Though underscores are better than dashes, dashes mean something in package names, to pip anyway) Unfortunately, plenty of PyPi psckages already use their own, inconsistent naming schemes, but we'll just have to live with that. |
One related point. On the lib and Python bindings point, if the library provides Python bindings, I think it is good if we can ensure both the library and Python bindings are installed in the same package. Combining these together so we aren't managing two related pieces and dealing with breaks between them will make maintenance and install more straightforward. Just my thought. If there are other opinions on this, please share. |
@jakirkham: it all depend on whether the lib is likely to be needed/used outside of the python package. I guess we should follow the original package developers lead here --f they bundle the lib on pypi, then we should too. (pyproj is a good example of that -- proj is certainly useful outside of python but the author packages it in with the python bindings) |
I don't agree necessarily. By necessity, if you package on PyPI (as a binary wheel) then you must bundle the lib dependencies as you have no other tool at your disposal. We do have a tool at our disposal to install non python dependencies, and should be using it IMO (otherwise we could have called this |
Agreed. As I said in #56 (comment) pyproj is a special case.
Most packager will read that: |
Down with
Agreed. For instance, take a case like |
I don't agree necessarily. By necessity, if you package on PyPI (as a True -- and folks usually statically link -- see matplotlib, for instance. So let me rephrase: if the package authors bundle the source to a CHB We do have a tool at our disposal to install non python dependencies, and Agreed. As I said in #56 (comment) If they bundle the lib on pypi Most packager will read that: add the lib as a dependency. I can say for — |
Not familiar with Pyproj, but I think I agree. protobuf is one that came to mind before. They bundle C++, Python, etc. source code together. |
cc @ccordoba12 |
Currently we have a few packages that diverge from
In conda-forge those have the |
agreed. Christopher Barker, Ph.D. Emergency Response Division |
I don't think this is sustainable: what happens if any other ecosystem (mostly the native one, but also lua/R/...) starts a new package with the same name? IMO it would pay off to be consistent and take a bit of pain due to renames (+ transitional packages?) |
On Sun, Jun 26, 2016 at 9:20 AM, Jan Schulz notifications@github.com
But we have a key problem here -- no none is controlling the namespace. For Is conda-forge accepted enough that we could call it an authority? i.e. if calling something py-the_name_on_pypi sort of solves the problem for python But maybe you're right -- solving part of the problem may be good enough -- -CHB Christopher Barker, Ph.D. Emergency Response Division |
Isn't it easier to teach users to use prefixes on everythin apart from real user apps (aka Edit:
This is an expectation which has to change and probably will change if users use conda for other ecosystems. |
I like this idea of transitioning to consistent prefixing conventions. There's definitely pain in doing so, but for the long-term I think it's important if the anaconda, conda, conda-forge communities want to be agnostic to particular languages and runtimes. I think it fits in the same general category as the work decoupling MSVC compiler runtimes from Python versions. |
It is true that prefixing is nice. I have generally been an advocate, but I'm also a pragmatist. We are hurting the user experience. For instance, one person had there Anaconda install go totally broken because of this. If we want to pursue prefixing, we need to do it with a transition period in mind. This could be with metapackages that share the old name, leaving The most important point IMHO is we should not be spending precious cycles resolving issues that amount to us making a choice that does not accept the current state of affairs with |
I unfortunately agree with @jakirkham. The sooner we are tooled to make this call on a merit basis the better, but in the meantime, we do need to maintain consistency with what has already taken place in defaults. |
I agree also. If Perhaps at a later time we can figure out a way to gracefully transition to using prefixed package names. |
God yes! I thought this was only about packages that are not currently in default But still -- there is a convention in default -- most python packages are And folks really do expect this to be the case! -CHB On Thu, Jun 30, 2016 at 8:14 AM, Jonathan J. Helmus <
Christopher Barker, Ph.D. Emergency Response Division |
A long, long time ago it was 😄 |
This problem seems to be very similar to the issue of Visual Studio versions/compiler level features to me. Disambiguating how a package is built/what it is built for seems to be an integral part of conda that hasn't been sorted out yet. For example, rather than manually prefixing, would it be easier if packages could be 'tagged' with which languages it provides implementations for? Then the user could be given the choice to select a particular language at install time? |
I believe we can close this issue (not that the discussion is over 😄). Any new "big" changes in the current naming polices should probably be submitted as an enhancement proposal. (Or at least added to the agenda for the meetings.) |
Just in case someone in the future stumbles across this closed issue, see this gist: https://gist.github.com/mcg1969/da5aec380d2ed083b79ddcf151ca16f1 |
Thanks @mwcraig! |
PIng! This just got linked to from another discussion -- looking over this thread, it was proposed that an MD page get created, ultimately to be included (Or linked to) from the conda-forge docs. @mwcraig started on that with the gist linked to above: https://gist.github.com/mcg1969/da5aec380d2ed083b79ddcf151ca16f1 looks like the discussion petered out in May... |
Just to clarify, I didn't write that gist, I just linked to it. I'm not capable of thinking that deeply about package name-spacing 😀 |
My 2-cents:
A possible conflict would be packages like
beautifulsoup4
(pypi) andbeautiful-soup
(anaconda name). I strongly believe that the majority of the users cannot find the anaconda package in a CLI search and end up installing the PyPI version.py<c-libname>
. For example:cdo
andpycdo
. (Or maybepython-cdo
?)lib<package name>
.Note that anaconda names the
netcdf
packagelibnetcdf
. However, that package is more than just the netcdf libs. Same forgdal
andlibdal
, but in that casegdal
is even more confusing because that is the python bindings only, and thelibdal
is the rest of the package. To me this behavior is a bad mix of the Linux world, that splits packages into lib, dev, headers, etc and the python bias that we have when packaging non-python packages.(See the issues raised on #16.)
The text was updated successfully, but these errors were encountered: