Giter Club home page Giter Club logo

pdm-make's Introduction

pdm-make

tool.pdm.scripts for building à la make

pyproject.toml

[tool.pdm.scripts]
# .vimrc: set makeprg=pdm\ build
pre_build.shell = """set -x;
ctags -R --languages=python __pypackages__ wumpus tests;
python -m black -q wumpus tests &&
python -m isort wumpus tests &&
python -m flake8 wumpus tests &&
python -m pytest --exitfirst --showlocals --verbose tests &&
{ export COLUMNS=97; python -m wumpus --help |
python -m mandown --width 89 --use-config >README.md; };
"""
rebuild.shell = "set -x; rm -f pdm.lock; pdm run clean && pdm install && pdm build"
clean.shell = """set -x;
rm -rf __pypackages__ .pytest_cache dist tags;
find . -type f -name '*.py[co]' -delete &&
find . -type d -name __pycache__ -delete
"""
# bump depends on: `pip install --user pdm-bump`
bump-micro.shell = "set -x; pdm bump micro && pdm run rebuild"
publish.shell = """set -x; cd dist; echo *.whl |
cpio -pdmuv `pip config get global.find-links`
"""

# Don't name `install` else `pre_install` and/or `post_install` will also run.
#xxinstall.shell = "set -x; unset PYTHONPATH; pip install --user wumpus"
#uninstall.shell = "set -x; unset PYTHONPATH; pip uninstall wumpus"
xxinstall.shell = "set -x; pipx install wumpus"
uninstall.shell = "set -x; pipx uninstall wumpus"
reinstall.shell = "set -x; pdm run uninstall; pdm run xxinstall"

~/.vimrc

if filereadable('pyproject.toml')
    set makeprg=pdm\ build
endif

vim

Run :make, then use :cnext and :cprevious to move through errors.

pdm-make's People

Contributors

russellane avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.