Michał Górny · @mgorny
199 followers · 912 posts · Server pol.social

Szczerze mówiąc, jestem wściekły, że versioningit istnieje. To jest gorsze niż wynajdywanie koła na nowo. To jest zbudowanie kwadratowego koła, reklamowanie go jako najlepszy wynalazek od czasu krojonego chleba i odmowa wsparcia okrągłych osi.

Wuchta wiary włożyła wuchtę roboty w setuptools-scm. Jest dobre, rozwiązano problemy, o których większość ludzi nawet nie myśli, jest przyjazne tworców paczek dystrybucji.

A versioningit reklamuje się jako "w odróżnieniu od innych, pozwalający na łatwe dostosowanie formatu wersji" (tłum. własne). No super. Powinniście się też pochwalić, że w odróżnieniu od innych obsługuje tylko dwa najczęstsze przypadki i odmawia wsparcia całej reszty.

github.com/jwodder/versioningi

#setuptools #python

Last updated 1 year ago

Michał Górny · @mgorny
170 followers · 719 posts · Server pol.social

Tanie obejście problemu paczek w Pythonie, które przypadkiem instalują `tests` (albo `examples`, itp.) przez błędne użycie `find_packages()`:

```
sed -i -e '/find_packages(/d' setup.py || die
```

Wykorzystuje nową logikę automatycznego wyszukiwania paczek w , która powinna sprawdzić się dla większości projektów. W możemy zakładać, że odpowiednio nowa wersja setuptools jest zainstalowana.

gitweb.gentoo.org/repo/gentoo.

#python #gentoo #setuptools

Last updated 1 year ago

stark@techhub.social:~$ █ · @Stark9837
404 followers · 2154 posts · Server techhub.social

@nobodyinperson

This is very useful, thank you! I've been meaning to start using

#setuptools #python

Last updated 1 year ago

Michał Górny · @mgorny
123 followers · 460 posts · Server pol.social

Inne wiadomości ze świata : nowy backend -build-core okazuje się psuć na jeszcze jeden sposób. Tym razem błąd zauważono przy wykorzystaniu -backend.

A, fail2ban też psuje. Może to ten sam problem.

scikit-build-core: github.com/scikit-build/scikit
fail2ban: bugs.gentoo.org/909535
poprzedni bug (psuł rozszerzenia ): github.com/scikit-build/scikit

#rustlang #pdm #setuptools #scikit #pep517 #python

Last updated 1 year ago

Michał Górny · @mgorny
113 followers · 396 posts · Server pol.social

Co więcej, 2 wymaga . Musiałem zamaskować 6 paczek, i wyłączyć niektóre funkcje w 4 kolejnych na profilach WD40.

Jakimś cudem jeszcze nie straciliśmy (było blisko).

gitweb.gentoo.org/repo/gentoo.

#python #setuptools #gentoo #rustlang #pydantic

Last updated 1 year ago

Michał Górny · @mgorny
52 followers · 275 posts · Server pol.social

Mieliśmy w wczoraj zgłoszony paskudny bug (na szczęście z tinderboksa, a nie prawdziwego systemu) — paczki z rozszerzeniami nie instalowały owych rozszerzeń.

ionen określił, że winę ponosi scikit-build-core. Ruszyłem do boju uzbrojony w print()y, i określiłem, że scikit-build-core i -rust oba nadpisują metodę Distribution.has_ext_modules(). Jeśli ten pierwszy jest wywołany jako drugi w kolejności, to nadpisuje metodę nadpisaną wcześniej przez setuptools-rust i rozszerzenia w Ruście są ignorowane.

github.com/scikit-build/scikit

#setuptools #rustlang #python #gentoo

Last updated 1 year ago

Michał Górny :gentoo: · @mgorny
447 followers · 2330 posts · Server fosstodon.org

had a very bad bug reported yesterday (fortunately hit by tinderbox, not real system) — packages not installing extensions.

ionen figured out scikit-build-core is to blame. I braced my print()s and determined that the cause is that both scikit-build-core and -rust are overriding Distribution.has_ext_modules() method. If the entry point of the former is executed later, it overwrites setuptools-rust and Rust extensions are ignored.

github.com/scikit-build/scikit

#gentoo #python #rustlang #setuptools

Last updated 1 year ago

So, is slowly abandoning `setup.py` which has served us well for years.

That's fine, there were some good reasons for doing that. I guess the approach taken by , , and possibly gave some ideas there.

Question is, how does one migrate? can do plug-ins, is there one that can analyse the `setup` object you create, and spit out a `pyproject.toml` file from it?

Also, can I ship a `setup.py` that reads the `pyproject.toml` and provides backward-compatibility?

#python #rust #go #nodejs #setuptools

Last updated 1 year ago

Juan Luis · @astrojuanlu
1243 followers · 1725 posts · Server social.juanlu.space

TIL that `wheel` is not needed as build requirement when using `setuptools`! setuptools.pypa.io/en/latest/u

> Historically this documentation has unnecessarily listed `wheel` in the `requires` list, and many projects still do that. This is not recommended.

#setuptools #python #packaging #pypa

Last updated 1 year ago

Jim Easterbrook · @jim_easterbrook
103 followers · 347 posts · Server mstdn.social

Decided it's about time I got to grips with the current system, starting with using a pyproject.toml file. Then I find (which seems to have a new version every week) stopped supporting Python 3.6 before it added pyproject.toml support. Python 3.6 is what's installed in my current 15.4 desktop machine.
packaging.python.org/en/latest

#OpenSUSE #setuptools #packaging #Python

Last updated 1 year ago

Michał Górny :gentoo: · @mgorny
297 followers · 1180 posts · Server fosstodon.org
Michał Górny :gentoo: · @mgorny
286 followers · 1096 posts · Server fosstodon.org

Remember when I was concerned that -style namespace being already installed to system trigger DeprecationWarnings when pkg_resources are imported? Well, that's no longer a real problem…

…because 67.5.0+ now unconditionally emit a DeprecationWarning when pkg_resources are imported. Expecting a lot of -based test suites to start suddenly failing. Fortunately, should be mostly unaffected (we force -Wdefault).

github.com/pypa/setuptools/pul

#setuptools #pytest #gentoo #python

Last updated 1 year ago

Michał Górny :gentoo: · @mgorny
257 followers · 940 posts · Server fosstodon.org

Pre- namespaces are deprecated for quite a while. started warning about use of namespace_packages= arg, and importing pkg_resources can throw a lot of deprecation warnings about namespace_packages.txt installed by other packages.

We've been removing explicit namespaces in for a while but it wasn't complete. Now I'm working on making the eclass strip pkg_resources namespaces completely.

#pep420 #python #setuptools #gentoo

Last updated 1 year ago

Michał Górny :gentoo: · @mgorny
255 followers · 928 posts · Server fosstodon.org

So I was thinking: now that pip does all builds isolated, let's get rid of in ensurepip. Turns out they've already thought of that ;-).

github.com/python/cpython/pull

#setuptools #python

Last updated 1 year ago

Michał Górny :gentoo: · @mgorny
238 followers · 792 posts · Server fosstodon.org

To provide more context, I've pushed new pypi.eclass update up for review. It features two changes:

- sdist and wheel filenames are normalized by default
- versions are translated into common PEP 440 equivalents by default

The latter is painless, the former can be painful because still don't follow PEP 625, so all packages using uppercase or dots need `--no-normalize`, sigh.

github.com/gentoo/gentoo/pull/

#gentoo #setuptools #python

Last updated 1 year ago

Michał Górny :gentoo: · @mgorny
225 followers · 737 posts · Server fosstodon.org

I've added a section on fixing poetry include issue to the Guide, and updated the section on installing stray test packages to cover declarative configs as well. Both can be now found in the QA chapter.

projects.gentoo.org/python/gui

#gentoo #python #setuptools

Last updated 2 years ago

Jimmy Angelakos :postgresql: · @vyruss
230 followers · 247 posts · Server fosstodon.org

Good evening . Best way to make imports work for both and also when running as a ?

#hivemind #python #pypi #package #builds #script #python3 #pythonista #build #setuptools

Last updated 2 years ago

Michał Górny :gentoo: · @mgorny
218 followers · 674 posts · Server fosstodon.org

Oh the joys of .

So I was happy that finally adapted for new packaging, and we could finally unblock it in .

Now I've discovered that pdm-pep517 (the legacy project, the one that was discontinued in favor of a rename/rewrite, after 4 packages started using it) requires old packaging. Blocker-class sigh.

Maybe I should just sed it into a flit-core and stop bothering.

#python #pep517 #setuptools #gentoo

Last updated 2 years ago

Michał Górny :gentoo: · @mgorny
217 followers · 667 posts · Server fosstodon.org

Good news, eveeryone! 67.0.0 is now in , and it unblocks dev-python/packaging upgrade.

setuptools.pypa.io/en/latest/h

Note that this implies making setuptools more strict e.g. about version syntax, so some packages may explode due to invalid versions or dependencies. Particularly beware of `;` usage in one-line install_requires/extras_require: setuptools.pypa.io/en/latest/u

#setuptools #gentoo #python

Last updated 2 years ago

Michał Górny :gentoo: · @mgorny
211 followers · 625 posts · Server fosstodon.org

Another discovery to brighten our day. It turns out that the `SETUPTOOLS_SCM_PRETEND_VERSION` trick we've been using to make GitHub archives installable doesn't guarantee that all files are installed.

So we're looking at 65 packages potentially installing a subset of their Python packages in right now. Most notably, `py.typed` markers could be msising.

github.com/jaraco/keyring/issu

#python #setuptools #gentoo

Last updated 2 years ago