Skip to content

Call towncrier via python instead of doing poor path reconstruction #1848

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

Merged
merged 1 commit into from
Jun 6, 2020

Conversation

mgorny
Copy link
Contributor

@mgorny mgorny commented Jun 6, 2020

Trying to append an executable suffix to towncrier does not work
on Linux, as it can create absurd names like towncrier.7 (.7 coming
from python3.7). Let's instead call it via python -m towncrier.
This should avoid relying on correct PATH (as I presume the original
code is meant to), while working correctly on all systems
and not requiring Python and towncrier to reside in the same directory.

Fixes #1847

Thanks for contributing, make sure you address all the checklists (for details on how see

development documentation)!

  • ran the linter to address style issues (tox -e fix_lint)
  • wrote descriptive pull request text
  • ensured there are test(s) validating the fix
  • added news fragment in docs/changelog folder
  • updated/extended the documentation

@codecov
Copy link

codecov bot commented Jun 6, 2020

Codecov Report

Merging #1848 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1848   +/-   ##
=======================================
  Coverage   88.84%   88.84%           
=======================================
  Files          82       82           
  Lines        3946     3946           
=======================================
  Hits         3506     3506           
  Misses        440      440           
Flag Coverage Δ
#tests 88.84% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3b16838...5cc2e58. Read the comment docs.

@mgorny mgorny force-pushed the towncrier-no-path branch from 9572512 to b58e776 Compare June 6, 2020 07:05
@gaborbernat gaborbernat force-pushed the towncrier-no-path branch 2 times, most recently from f4bada0 to 7af0d58 Compare June 6, 2020 08:44
Trying to append an executable suffix to towncrier does not work
on Linux, as it can create absurd names like `towncrier.7` (`.7` coming
from `python3.7`).  Let's instead call it via `python -m towncrier`.
This should avoid relying on correct `PATH` (as I presume the original
code is meant to), while working correctly on all systems
and not requiring Python and towncrier to reside in the same directory.

Fixes pypa#1847

Signed-off-by: Bernat Gabor <[email protected]>
@gaborbernat gaborbernat merged commit 78fbdc3 into pypa:master Jun 6, 2020
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.

sphinx fails to build docs on Linux, trying to call /usr/bin/towncrier.8
2 participants