holoviz-dev / pyctdev

Python packaging Common Tasks for Developers
BSD 3-Clause "New" or "Revised" License
11 stars 2 forks source link

Begin version 0.6: more support for project authors to say things about packaging #6

Closed ceball closed 4 years ago

ceball commented 6 years ago

Currently, pytdev expects python projects to use python setuptools config to declare as much common packaging info as they can (e.g. description, dependencies, etc). (Note: Although it's setuptools setup.cfg right now because support for that's all built into python and it's used anyway by conda build, it could instead be any other format, e.g. conda build meta.yaml.)

Whatever's used, though, it's probably not possible for project authors to express in only one packaging tool's existing config everything they know to help packagers. This PR allows projects to add some custom things to setup.cfg, so that project authors can give more hints to packagers. pyctdev will use those hints when packaging (where possible, depending on what kind of packages it's making). And manual/semi-manual packagers (e.g. conda-forge package maintainers) could read those hints.

New features

jsignell commented 5 years ago

@ceball I'd like to merge this since I think it does some nice cleanups. Could you check off which of the goals listed above this PR accomplishes?

jsignell commented 5 years ago

I was wondering if we should just vendor in doit as well as tox so that we can just have one dependency and overwrite CmdAction and PythonAction with more logging.

jbednar commented 5 years ago

Fine by me.

ceball commented 5 years ago

I was wondering if we should just vendor in doit as well as tox so that we can just have one dependency

Maybe re-write pyctdev using something other than python and distribute as a static binary? ;)

In case it helps to know the history, I vendored tox (and one of its required dependencies, virtualenv) to allow part of tox to be used by conda users. The readme in the _vendor dir says:

The zip files here allow tox to be used from the conda ecosystem for reading tox.ini; 
see imports in pyctdev/util.py for explanation.

pyctdev/util.py says:

# Fallbacks for conda, which can't install tox from defaults (at
# least, not as of June 2018). Allows to parse tox.ini (i.e. to use
# tox.ini as single place where all test cmds and envs are stored)

I don't know how much of that is still true.

I remember simplifying the vendoring a bit in 0.7, but I don't remember the details.

According to https://www.wheelodex.org/projects/doit/, doit has these requirements:

Requires-Python: | >=3.4
Requires-Dist: | cloudpickle
Requires-Dist: | macfsevents; sys_platform == "darwin"
Requires-Dist: | pyinotify; sys_platform == "linux"

Not sure how feasible to vendor those things/their dependencies, though the parts of doit used by pyctdev (at least currently) presumably don't need inotify/similar.

ceball commented 5 years ago

I was replying to your comment as it just showed up in my email. But I see now it's from 12 Feb! Sorry - just ignore me. Evidently I don't understand github emails any more :)

jsignell commented 5 years ago

Oh it probably showed up because I pinned pip on this branch :)

ceball commented 4 years ago

I'm planning to merge this PR, but then need to check that metadata in setup.py is still supported.