René's URL Explorer Experiment


Title: Docs: Create venv if missing by hugovk · Pull Request #98266 · python/cpython · GitHub

Open Graph Title: Docs: Create venv if missing by hugovk · Pull Request #98266 · python/cpython

X Title: Docs: Create venv if missing by hugovk · Pull Request #98266 · python/cpython

Description: Problem I started getting this error: $ make -C Doc clean rm -rf ./venv rm -rf build/* $ make -C Doc html mkdir -p build Building NEWS from Misc/NEWS.d with blurb PATH=./venv/bin:$PATH sphinx-build -b html -d build/doctrees -j auto -W . build/html Running Sphinx v5.1.1 making output directory... done Theme error: no theme named 'python_docs_theme' found (missing theme.conf?) make: *** [build] Error 2 That's because I have no venv so it can't find the theme. The problem is we have this, which looks for Sphinx in the venv or $PATH: SPHINXBUILD = PATH=$(VENVDIR)/bin:$$PATH sphinx-build And in my case it's finding it in my $PATH, so this guard passes: cpython/Doc/Makefile Line 55 in b863b9c elif $(BLURB) help >/dev/null 2>&1 && $(SPHINXBUILD) --version >/dev/null 2>&1; then \ But I don't get this warning: cpython/Doc/Makefile Lines 65 to 66 in b863b9c echo "Missing the required blurb or sphinx-build tools."; \ echo "Please run 'make venv' to install local copies."; \ Fix Two things (aka let's do it like the devguide) let's just use the tools in the venv, not $PATH (to make the guard fail, and show the warning): https://github.com/python/devguide/blob/05f6d0c8d09bd757440e0346190dbd62e06c7251/Makefile#L9-L10 and add ensure-venv target that will install the venv if the venv dir is missing (to avoid the warning in the first place): https://github.com/python/devguide/blob/05f6d0c8d09bd757440e0346190dbd62e06c7251/Makefile#L58-L64 Bonus Whilst we're changing Docs/Makefile, PR #98189 recently fixed some missing .PHONY targets. 👍 I expect missing .PHONY targets will happen again, because it's normal to copy/paste a target, and forget (or not know) to update the long .PHONY line right at the top. Let's do as @zware suggested and define them right next to each target: #98189 (comment) We do this at Pillow and at work, it helps a lot. (I'll add it to the devguide and PEPs too.)

Open Graph Description: Problem I started getting this error: $ make -C Doc clean rm -rf ./venv rm -rf build/* $ make -C Doc html mkdir -p build Building NEWS from Misc/NEWS.d with blurb PATH=./venv/bin:$PATH sphinx-build...

X Description: Problem I started getting this error: $ make -C Doc clean rm -rf ./venv rm -rf build/* $ make -C Doc html mkdir -p build Building NEWS from Misc/NEWS.d with blurb PATH=./venv/bin:$PATH sphinx-build...

Opengraph URL: https://github.com/python/cpython/pull/98266

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:1d90d1aa-a201-4d7f-4ad8-bffb7aa3cde1
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB0F4:3410DA:1B2B27A:23503EB:696B362B
html-safe-nonce9b84398584caeecdadb45b0cbe5974f2eb8fb487c01cfd27f980a2607ebd0e08
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMEY0OjM0MTBEQToxQjJCMjdBOjIzNTAzRUI6Njk2QjM2MkIiLCJ2aXNpdG9yX2lkIjoiNjUwOTYyMDg2NzAyMzcxMzgzNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac0fae791105a8009ffa895f2f9243e9b5ab4638bf3ddf99304f8f58bdd316368a
hovercard-subject-tagpull_request:1087682438
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/98266/files
twitter:imagehttps://avatars.githubusercontent.com/u/1324225?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1324225?s=400&v=4
og:image:altProblem I started getting this error: $ make -C Doc clean rm -rf ./venv rm -rf build/* $ make -C Doc html mkdir -p build Building NEWS from Misc/NEWS.d with blurb PATH=./venv/bin:$PATH sphinx-build...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release82560a55c6b2054555076f46e683151ee28a19bc
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/98266/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F98266%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F98266%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/98266/files
Reloadhttps://github.com/python/cpython/pull/98266/files
Reloadhttps://github.com/python/cpython/pull/98266/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/98266/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/98266/files
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
hugovkhttps://github.com/hugovk
python:mainhttps://github.com/python/cpython/tree/main
hugovk:update-docs-makefilehttps://github.com/hugovk/cpython/tree/update-docs-makefile
Conversation 4 https://github.com/python/cpython/pull/98266
Commits 4 https://github.com/python/cpython/pull/98266/commits
Checks 0 https://github.com/python/cpython/pull/98266/checks
Files changed https://github.com/python/cpython/pull/98266/files
Please reload this pagehttps://github.com/python/cpython/pull/98266/files
Docs: Create venv if missing https://github.com/python/cpython/pull/98266/files#top
Show all changes 4 commits https://github.com/python/cpython/pull/98266/files
325db7f Docs: Add ensure-venv target to create venv if dir missing hugovk Oct 14, 2022 https://github.com/python/cpython/pull/98266/commits/325db7f62d8d51755c8355ad62cca7433efbb80d
48a6bfd Docs: Use tools from venv hugovk Oct 14, 2022 https://github.com/python/cpython/pull/98266/commits/48a6bfddae388c364d1895890af7cfadbf371a17
aeb85ad Docs: Move .PHONY to each section to avoid copy/paste omissions hugovk Oct 14, 2022 https://github.com/python/cpython/pull/98266/commits/aeb85ad5664c47efc8a7ee3adebb7c968187eb3b
f40416a Docs: Add ensure-venv target to create venv if dir missing hugovk Oct 14, 2022 https://github.com/python/cpython/pull/98266/commits/f40416a2d3667728fb90147d2e652690326be0ca
Clear filters https://github.com/python/cpython/pull/98266/files
Please reload this pagehttps://github.com/python/cpython/pull/98266/files
Please reload this pagehttps://github.com/python/cpython/pull/98266/files
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L102
Doc/Makefilehttps://github.com/python/cpython/pull/98266/files#diff-a5a6b8d06efdd9fcda4979c51e0abc76642899e6c9b4ffe238f5cdb7c5fd2bac
View file https://github.com/hugovk/cpython/blob/f40416a2d3667728fb90147d2e652690326be0ca/Doc/Makefile
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/98266/{{ revealButtonHref }}
https://github.com/python/cpython/pull/98266/files#diff-a5a6b8d06efdd9fcda4979c51e0abc76642899e6c9b4ffe238f5cdb7c5fd2bac
https://github.com/python/cpython/pull/98266/files#diff-a5a6b8d06efdd9fcda4979c51e0abc76642899e6c9b4ffe238f5cdb7c5fd2bac
https://github.com/python/cpython/pull/98266/files#diff-a5a6b8d06efdd9fcda4979c51e0abc76642899e6c9b4ffe238f5cdb7c5fd2bac
https://github.com/python/cpython/pull/98266/files#diff-a5a6b8d06efdd9fcda4979c51e0abc76642899e6c9b4ffe238f5cdb7c5fd2bac
https://github.com/python/cpython/pull/98266/files#diff-a5a6b8d06efdd9fcda4979c51e0abc76642899e6c9b4ffe238f5cdb7c5fd2bac
https://github.com/python/cpython/pull/98266/files#diff-a5a6b8d06efdd9fcda4979c51e0abc76642899e6c9b4ffe238f5cdb7c5fd2bac
https://github.com/python/cpython/pull/98266/files#diff-a5a6b8d06efdd9fcda4979c51e0abc76642899e6c9b4ffe238f5cdb7c5fd2bac
https://github.com/python/cpython/pull/98266/files#diff-a5a6b8d06efdd9fcda4979c51e0abc76642899e6c9b4ffe238f5cdb7c5fd2bac
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.