Skip to content

Add a how to for packaging a fork#2780

Merged
jaimergp merged 5 commits intoconda-forge:mainfrom
mgorny:howto-package-a-fork
Apr 7, 2026
Merged

Add a how to for packaging a fork#2780
jaimergp merged 5 commits intoconda-forge:mainfrom
mgorny:howto-package-a-fork

Conversation

@mgorny
Copy link
Copy Markdown
Contributor

@mgorny mgorny commented Mar 25, 2026

PR Checklist:

  • note any issues closed by this PR with closing keywords
  • if you are adding a new page under docs/ or community/, you have added it to the sidebar in the corresponding _sidebar.json file
  • put any other relevant information below

An initial attempt to describe the recommendations and risks. Largely based on #1851, though I've expanded it a bit based on my past Gentoo experience. The specific points are open to discussion.

Fixes #1851

@mgorny mgorny requested a review from a team as a code owner March 25, 2026 16:48
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 25, 2026

Deploy Preview for conda-forge-previews ready!

Name Link
🔨 Latest commit abf45db
🔍 Latest deploy log https://app.netlify.com/projects/conda-forge-previews/deploys/69d1051840785c0008358277
😎 Deploy Preview https://deploy-preview-2780--conda-forge-previews.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 71
Accessibility: 96
Best Practices: 100
SEO: 89
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@mgorny
Copy link
Copy Markdown
Contributor Author

mgorny commented Mar 31, 2026

CC @carterbox

Copy link
Copy Markdown
Member

@carterbox carterbox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first four ## headings are different approaches of packaging a fork. The last two ## headings are discussion about the pro/con of different approaches. They should not all be at the same heading level.

The points of the last two headings should probably just be integrated into the text of relevant section which describes the approach OR the current sections should be reorganized into three levels of hierachy instead of two.

This is usually done via prepending or appending the fork owner, or some distinguishing keyword to the package name.
This is similar to how different packages that happened to use the same name are handled.

For example, a fork updating `django-cryptography` package to support Django 5 was packaged as `django-cryptography-django5`. A fork of `ctypesgen` by `pypdfium2-team` was packaged as `ctypesgen-pypdfium2-team`.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of the examples in this section have prepended owner names. They are all appended owner names. However, prepending should be the preferred convention because it follows the naming convention of forks on GitHub (owner/repo) and appending is usually how subpackages are indicated (package-feature).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know any examples I could cite here? I couldn't think of a clear way to find these.

Copy link
Copy Markdown
Member

@carterbox carterbox Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried search for the mutex syntax, but I think there aren't many examples where both the fork and the upstream package exist on channel.

https://github.com/search?q=org%3Aconda-forge+%3C0.0a0+language%3AYAML&type=code&l=YAML

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My project uses the pre-pend name approach:

https://github.com/conda-forge/carterbox-torch-radon-feedstock

This project is technically a rename because the upstream source project is literally called "phenomenizer-fork"

https://github.com/conda-forge/phonemizer-fork-feedstock

These two forks of sdsl both opened staged-recipes in 2022, but were scared off when I asked them to rebrand.

conda-forge/staged-recipes#20669 (comment)
conda-forge/staged-recipes#17965

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

faust-cchardet

https://github.com/faust-streaming/cChardet

Yeah, but that's the PyPI name, so not really a case of downstream renaming.

My project uses the pre-pend name approach:

https://github.com/conda-forge/carterbox-torch-radon-feedstock

Yeah, I suppose that will work.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but that's the PyPI name, so not really a case of downstream renaming.

That's the point? If they don't want to brand their fork, they can prefix the fork owner's name to the conda package name. Both forks are cChardet. On PYPI, one is cchardet and the other is faust-cchardet because the owner of the fork is faust.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, so we're talking about upstream too. My assumption was that the "rebranding" section was about what upstream does, while this section was about what we do when upstream doesn't use an original name.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we're agreeing. This section is about naming the conda package differently from the source repo / project name by prepending the author's name to the conda package name.

@mgorny
Copy link
Copy Markdown
Contributor Author

mgorny commented Apr 2, 2026

Yeah, I need to improve the organization. Part of the problem is that some points are common to more than one approach, and I didn't really want to repeat them, or say "same as X".

@mgorny mgorny force-pushed the howto-package-a-fork branch from ee8b0ab to 9178cde Compare April 2, 2026 17:21
@mgorny
Copy link
Copy Markdown
Contributor Author

mgorny commented Apr 2, 2026

Addressed all comments except for the examples, and rebased.

@mgorny mgorny requested a review from carterbox April 2, 2026 17:21
mgorny added 5 commits April 4, 2026 14:32
Fixes conda-forge#1851

Signed-off-by: Michał Górny <mgorny@quansight.com>
Signed-off-by: Michał Górny <mgorny@quansight.com>
Signed-off-by: Michał Górny <mgorny@quansight.com>
Signed-off-by: Michał Górny <mgorny@quansight.com>
Signed-off-by: Michał Górny <mgorny@quansight.com>
@mgorny mgorny force-pushed the howto-package-a-fork branch from 07343d5 to abf45db Compare April 4, 2026 12:33
@jaimergp jaimergp merged commit d6c8e24 into conda-forge:main Apr 7, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to package a fork of a package

3 participants