-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
deprecate and remove the upload_docs command #2971
Comments
If may I ask to leave that part until some replacement will be not developed. IMO it is big difference between IMO it is kid of need to have generic way to not only build but install documentation (depends on chosen rendered format it should be different dest location). |
Does Setuptools currently provide a way to install documentation?
If I try to distill the requirements, they boil down to:
I'd also say:
In my experience, a simple tox environment does all of these things, while simultaneously being largely decoupled from specifics of the implementation. I can even imagine using Admittedly, having those lines in each project is a bit of a burden. It might be nice for a tool to solicit a small subset of behaviors into declarative options in pyproject.toml (with defaults). I contend that the tox approach, while not perfect, easily obviates the features offered by |
Recently @webknjaz has brought to my attention that the So I think there is not much left to do from setuptools perspective? It is likely that users seeking replacement will have to call |
Issue is that sphinx it is not only tooling used to generate documentation. |
In that scenario, I am afraid it will be necessary to analyse package by package. Hopefully most of them will have something like In fact, it is already currently impossible to guarantee all the packages rely on If you are after improving compatibility and the standards for distributing and building the docs, I think the best course of action is to bring this discussion to https://discuss.python.org/c/packaging/14. The topic https://discuss.python.org/t/graceful-cooperation-between-external-and-python-package-managers-pep-668/10302 might also interest you. |
Amongst +750 packaged module as rpm package probably only 3-5 have something like that. As I'm building my rpm packages in isolated envs in which is installed set of build dependencies I don't need tox wrapping on testing. Result: [tkloczko@ss-desktop SPECS]$ echo tox; grep 'python3dist(tox)' python-*; echo nox ; grep 'python3dist(nox)' python-*; echo; ls -1 python-*|wc -l
tox
python-dpkt.spec:BuildRequires: python3dist(tox)
python-gitlab.spec:BuildRequires: python3dist(tox)
python-jedi.spec:BuildRequires: python3dist(tox)
python-lazy-object-proxy.spec:BuildRequires: python3dist(tox)
python-nox.spec:BuildRequires: python3dist(tox)
python-tox-current-env.spec:BuildRequires: python3dist(tox)
python-twisted.spec:BuildRequires: python3dist(tox)
python-zope-interface.spec:BuildRequires: python3dist(tox)
nox
python-googleapis-common-protos.spec:BuildRequires: python3dist(nox)
python-pytest-harvest.spec:#BuildRequires: python3dist(nox)
python-yaxmldiff.spec:BuildRequires: python3dist(nox)
760 So at the moment I'm using tox in only about 1% of all build procedures descriptions written as rpm spec file. [tkloczko@ss-desktop SPECS]$ grep 'python3dist(pytest)' python-*|wc -l
643 Most of the time and other resources consuming by tox is used to prepare actual venv. With my current almost 4k rpm packages I have days when my automation on top of production builds performs even few thousands additional builds only to test that sill other packages are correctly building. From that point of view I'm carefully choosing what I'm implementing in build procedures. And again .. tox build procedure description will be always functional/non-declarative which in longer time will be as always harder to maintain. Result sooner or later will be that most of those |
I understand your position here, and I do value your effort in trying to bring documentation accessible via terminal (I am a huge fan of offline docs...). However, after seeing your last comment, I am convinced that currently there is no silver bullet for your use case ( I encourage you to engage the community in https://discuss.python.org/c/packaging/14, hopefully the discussion can result in a new PEP that will make it easier for you to achieve your objectives. Meanwhile, |
Action items:
Not sure if this needs to be documented anywhere — setuptools is a framework for producing packages, not docs. |
Thank you very much @webknjaz for summarising the future steps. Should we deprecate |
I believe there's been an attempt in the past that was followed by some of the users giving feedback that they use it outside of the PyPI index that lead to it being kept. Maybe @jaraco remembers better. |
That is true because still I have no full idea how to provide that kind functionality in first place :P I'm only more or less aware that producing documentation using some standard procedure may not only simplify what I'm personally doing but it may generally improve accessibility and quality of the python modules documentation for end users/developers. Good is that So please don't stop whole conversation at current point. Please bring to the table some criticism or please ask/invite some people who you know that may provide some high level critique (all that without trying to write even single line of code ..) Summarising .. [docs]
source-dir = <some/doc/subdirectory> # default should be docs
generator = {sphinx|mkdoc|whatever} and other properties which are already documented in setuptools<>sphinx integration https://www.sphinx-doc.org/en/master/usage/advanced/setuptools.html Is that looks valid/doable/not to much disturbing module code which will be necessary to modify? |
@kloczek As several of the developers here have explained, standardizing a way to invoke building, and perhaps even packaging/installing docs (beyond just Sphinx, many projects nowadays use mkdocs or myST, and a handful use other builders) is a potentially valuable endevour worthy of discussion and listening to the needs of stakeholders like yourself (which, indeed, needs to happen before something is written and standardized). However, as they've also stated, Setuptools is moving toward focusing more tightly on being a PEP 517 build backend, rather than a jack of all trades (and master of none), and many projects are evolving to not rely on Setuptools at all (as you mentioned). Therefore, as it likely isn't something that would be implemented by Setuptools, and if it were, it would need standardization first, the best place to have this discussion is the packaging section of the Python Discourse, the authoritative place to discuss new packaging-related standards. We'd love to see a proposal on this topic over there, and if there was sufficient interest, could help guide you toward either a PEP or perhaps other ideas/tools to achieve this. Thanks! |
I know. I'm aware of that .. 😄 |
The goal of And in order to do that, you need to start a discussion and eventually propose a PEP on the Packaging section of the Python Discourse, which is a much more appropriate place to discuss this than this tangentially related issue, so I strongly suggest you take your further replies there. Thanks. |
I don’t see or recall any attempts to deprecate/remove upload docs, but it does seem like the right thing to do. |
I think this issue can be retitled to "Deprecate and drop |
I can't seem to find the associated PR(s), but it appears the setuptools-actionable task may have been completed given the above-linked commits. Also, @kloczek , you might be interested in this Packaging Discourse discussion on this topic, on which I mention this issue (among others) in my latest post. |
@jaraco There's a comment there pointing at https://bitbucket.org/hpk42/devpi/issues/388/support-rtd-model-for-building-uploading#comment-34292423 which has moved to devpi/devpi#388. devpi/devpi#619 seems to indicate that there's an alternative way of uploading the docs to devpi through their client so this shouldn't be considered a blocker anymore.
@CAM-Gerlach The deprecation in the command definition seems to only be issued for PyPI upload attempts. I think it should first become unconditional and then removed. |
In #1988, we are exploring the deprecation of many of the setup.py invocations. Based on your experience and mine and that of RTD, I’d like to consider deprecating and removing the build_sphinx command.
Originally posted by @jaraco in #2761 (comment)
The text was updated successfully, but these errors were encountered: