8000 GitHub - houbie/pdmwrapper: proof of concept for a bootstrap pdm command like the one that gradle provides
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Dec 8, 2021. It is now read-only.

houbie/pdmwrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pdmwrapper

TL;DR

Build/test Python projects with decent dependency management and without tool installation hassle.

  • git clone https://github.com/houbie/pdmwrapper.git
  • ./pdmw install
  • when using pyenv: pdm use $(pyenv which python)
  • ./pdmw run pytest

What?

Experiment to mimic the gradle wrapper features for PDM

The wrapper is a small script that is stored in the source repo of a project. The wrapper forwards all invocations to the actual build tool, but on the first invocation it will install the correct version of the build tool inside the project.

Why?

The benefits are threefold:

  • build results are consistent because all developers and the CI/CD server use the same version of the build tool
  • frictionless development setup: just clone and build the project, having the platform (Python in this case) installed is enough to get started
  • breaking changes in the build tool don't break your project

The developers that will once inherit your projects will be very grateful that they don't have to spend a couple of days setting up a dev environment in order to change one line of code.

How?

  • The script installs PDM in .pdm/$PDM_VERSION with something like pip install pdm==$PDM_VERSION --target .pdm/$PDM_VERSION
  • It adds .pdm/$PDM_VERSION to the PYTHONPATH
  • Calls pdm while passing all arguments

TODO

  • Cleanup the pdmw wrapper script
  • Create a Windows script
  • Is pip install the best strategy? Or is it better to maintain a downloadable self contained archive, or ...?
  • Why is the pdm use $(pyenv which python) step needed?

I'm not a shell specialist and python noob, so definitely need help here.

About

proof of concept for a bootstrap pdm command like the one that gradle provides

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0