A PDM plugin to publish to PyPI

Related tags

Miscellaneouspypipdm
Overview

PDM Publish

ci pypi version code style: black checked with mypy

A PDM plugin to publish to PyPI

NOTE: Consider if you need this over using twine directly

Installation

If you installed pdm via pipx:

pipx inject pdm pdm-publish

or brew:

$(brew --prefix pdm)/libexec/bin/python -m pip install pdm-publish

or pip:

pip install --user pdm-publish

Usage

pdm-publish enables pdm to publish packages to PyPI by wrapping twine internally. For example, to build and publish:

# Using token auth
pdm publish --password token
# To test PyPI using basic auth
pdm publish -r testpypi -u username -P password
# To custom index
pdm publish -r https://custom.index.com/

Full usage:

$ pdm publish --help
Upload artifacts to a remote repository

Usage:

Options:
  -h, --help            show this help message and exit
  -v, --verbose         -v for detailed output and -vv for more detailed
  -g, --global          Use the global project, supply the project root with
                        `-p` option
  -p PROJECT_PATH, --project PROJECT_PATH
                        Specify another path as the project root, which
                        changes the base of pyproject.toml and __pypackages__
  -r REPOSITORY, --repository REPOSITORY
                        The repository name or url to publish the package to
                        [env var: PDM_PUBLISH_REPO]
  -u USERNAME, --username USERNAME
                        The username to access the repository [env var:
                        PDM_PUBLISH_USERNAME]
  -P PASSWORD, --password PASSWORD
                        The password to access the repository [env var:
                        PDM_PUBLISH_PASSWORD]
  --dry-run             Perform all actions except upload the package
  --no-build            Don't build the package before publishing

Configuration

Config Item Description Default Value Available in Project Env var
publish.repo PyPI repo name (pypi/testpypi) or url pypi True PDM_PUBLISH_REPO
publish.username PyPI username __token__ True PDM_PUBLISH_USERNAME
publish.password PyPI password True PDM_PUBLISH_PASSWORD

Links

You might also like...
A simple but flexible plugin system for Python.

PluginBase PluginBase is a module for Python that enables the development of flexible plugin systems in Python. Step 1: from pluginbase import PluginB

Poetry plugin to bundle projects into various formats

Poetry bundle plugin This package is a plugin that allows the bundling of Poetry projects into various formats. Installation The easiest way to instal

Simple card retirement plugin for Anki

Anki Retirement Addon Allow users to suspend, tag, delete, or move cards that reach a specific retirement interval Supports Anki version 2.1.45 Licens

A maubot plugin to invite users to Matrix rooms according to LDAP groups

LDAP Inviter Bot This is a maubot plugin that invites users to Matrix rooms according to their membership in LDAP groups.

Plugin to generate BOM + CPL files for JLCPCB
Plugin to generate BOM + CPL files for JLCPCB

KiCAD JLCPCB tools Plugin to generate all files necessary for JLCPCB board fabrication and assembly Gerber files Excellon files BOM file CPL file Furt

IDA Pro plugin that shows the comments in a database
IDA Pro plugin that shows the comments in a database

ShowComments A Simple IDA Pro plugin that shows the comments in a database Installation Copy the file showcomments.py to the plugins folder under IDA

Poetry workspace plugin for Python monorepos.

poetry-workspace-plugin Poetry workspace plugin for Python monorepos. Inspired by Yarn Workspaces. Adds a new subcommand group, poetry workspace, whic

A plugin for poetry that allows you to execute scripts defined in your pyproject.toml, just like you can in npm or pipenv

poetry-exec-plugin A plugin for poetry that allows you to execute scripts defined in your pyproject.toml, just like you can in npm or pipenv Installat

tox-gh is a tox plugin which helps running tox on GitHub Actions with multiple different Python versions on multiple workers in parallel

tox-gh is a tox plugin which helps running tox on GitHub Actions with multiple different Python versions on multiple workers in parallel. This project is inspired by tox-travis.

Comments
  • Github Action fails due to getpass.py

    Github Action fails due to getpass.py

    When trying to use a Github Action to publish to Pypi.org, I receive the following error:

    Run pdm publish -u __token__ -p ***
    /opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/getpass.py:91: GetPassWarning: Can not control echo on the terminal.
    Password:
      passwd = fallback_getpass(prompt, stream)
    Warning: Password input may be echoed.
     [Abort]: 
    Add '-v' to see the detailed traceback
    Error: Process completed with exit code 1.
    
    opened by garysb 0
  • _Py_HashRandomization_Init fails on windows

    _Py_HashRandomization_Init fails on windows

    Running the generated command manually (without non-interactive, of course) works fine, invoking thru pdm-publish raises the following error,

     - Adding scikit_bio_parasail-0.0.1.dist-info/RECORD
    Built wheel at C:/Users/andre/source/scikit-bio-parasail/dist\scikit_bio_parasail-0.0.1-py3-none-any.whl
    Publish failed
    Fatal Python error: _Py_HashRandomization_Init: failed to get random numbers to initialize Python
    Python runtime state: preinitialized
    
    
    Traceback (most recent call last):
      File "C:\Users\andre\scoop\apps\python\current\lib\runpy.py", line 196, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "C:\Users\andre\scoop\apps\python\current\lib\runpy.py", line 86, in _run_code
        exec(code, run_globals)
      File "C:\Users\andre\scoop\apps\pdm\current\venv\Scripts\pdm.exe\__main__.py", line 7, in <module>
      File "C:\Users\andre\scoop\apps\pdm\1.13.6\venv\lib\site-packages\pdm\core.py", line 233, in main
        return Core().main(args)
      File "C:\Users\andre\scoop\apps\pdm\1.13.6\venv\lib\site-packages\pdm\core.py", line 168, in main
        raise cast(Exception, err).with_traceback(traceback)
      File "C:\Users\andre\scoop\apps\pdm\1.13.6\venv\lib\site-packages\pdm\core.py", line 163, in main
        f(options.project, options)
      File "C:\Users\andre\scoop\apps\pdm\1.13.6\venv\lib\site-packages\pdm_publish\command.py", line 74, in handle
        publisher.publish(
      File "C:\Users\andre\scoop\apps\pdm\1.13.6\venv\lib\site-packages\pdm_publish\core.py", line 49, in publish
        resp.check_returncode()
      File "C:\Users\andre\scoop\apps\python\current\lib\subprocess.py", line 456, in check_returncode
        raise CalledProcessError(self.returncode, self.args, self.stdout,
    subprocess.CalledProcessError: Command '['C:\\Users\\andre\\scoop\\apps\\pdm\\1.13.6\\venv\\Scripts\\python.exe', '-m', 'twine', 'upload', '--non-interactive', '--repository', 'pypi', '--username', '__token__', 'C:\\Users\\andre\\source\\scikit-bio-parasail\\dist\\scikit_bio_parasail-0.0.1-py3-none-any.whl', 'C:\\Users\\andre\\source\\scikit-bio-parasail\\dist\\scikit-bio-parasail-0.0.1.tar.gz']' returned non-zero exit status 1.
    
    
    opened by theAeon 1
Releases(v0.2.1)
Owner
Branch Vincent
Branch Vincent
LinkML based SPARQL template library and execution engine

sparqlfun LinkML based SPARQL template library and execution engine modularized core library of SPARQL templates generic templates using common vocabs

Linked data Modeling Language 6 Oct 10, 2022
It converts ING BANK account historic into a csv file you can import in HomeBank application.

ing2homebank It converts your ING Bank account historic csv file into another csv file you can import in HomeBank application

1 Feb 14, 2022
Demo Python project using Conda and Poetry

Conda Poetry This is a demonstration of how Conda and Poetry can be used in a Python project for dev dependency management and production deployment.

Ryan Allen 2 Apr 26, 2022
Um Script De Mensagem anonimas Para linux e Termux Feito em python

Um Script De Mensagem anonimas Para linux e Termux Feito em python feito em um celular

6 Sep 09, 2021
An ultra fast cross-platform multiple screenshots module in pure Python using ctypes.

Python MSS from mss import mss # The simplest use, save a screen shot of the 1st monitor with mss() as sct: sct.shot() An ultra fast cross-platfo

Mickaël Schoentgen 799 Dec 30, 2022
Python communism - A module for initiating the communist revolution in each of our python modules

Python communist revolution A man once said to abolish the classes or something

758 Jan 03, 2023
全局指针统一处理嵌套与非嵌套NER

GlobalPointer 全局指针统一处理嵌套与非嵌套NER。 介绍 博客:https://kexue.fm/archives/8373 效果 人民日报NER 验证集F1 测试集F1 训练速度 预测速度 CRF 96.39% 95.46% 1x 1x GlobalPointer (w/o RoPE

苏剑林(Jianlin Su) 183 Jan 06, 2023
Async timeit - Async version of python's timeit

Async Timeit Replica of default python timeit module with small changes to allow

Raghava G Dhanya 3 Apr 13, 2022
List of Linux Tools I put on almost every linux / Debian host

Linux-Tools List of Linux Tools I put on almost every Linux / Debian host Installed: geany -- GUI editor/ notepad++ like chkservice -- TUI Linux ser

Stew Alexander 20 Jan 02, 2023
An awesome list of AI for art and design - resources, and popular datasets and how we may apply computer vision tasks to art and design.

Awesome AI for Art & Design An awesome list of AI for art and design - resources, and popular datasets and how we may apply computer vision tasks to a

Margaret Maynard-Reid 20 Dec 21, 2022
Runtime inspection utilities for Python typing module

Typing Inspect The typing_inspect module defines experimental API for runtime inspection of types defined in the Python standard typing module. Works

Ivan Levkivskyi 284 Dec 29, 2022
Never get kicked for inactivity ever again!

FFXIV AFK Bot Tired of getting kicked from games due to inactivity? This Bot will make random movements in random intervals to prevent you from gettin

5 Jan 12, 2022
A feed generator. Currently supports generating RSS feeds from Google, Bing, and Yahoo news.

A feed generator. Currently supports generating RSS feeds from Google, Bing, and Yahoo news.

Josh Cardenzana 0 Dec 13, 2021
One-stop-shop for docs and test coverage of dbt projects.

dbt-coverage One-stop-shop for docs and test coverage of dbt projects. Why do I need something like this? dbt-coverage is to dbt what coverage.py and

Slido 106 Dec 27, 2022
Create rangebased on lists or values of the range itself. Range any type. Can you imagine?

funcao-allrange-for-python3 Create rangebased on lists or values of the range itself. Range any type. Can you imagine? WARNING!!! THIS MODULE DID NOT

farioso-fernando 1 Feb 09, 2022
Программа для практической работы №12 по дисциплине

Информатика: программа для практической работы №12 Код и блок-схема программы для практической работы №12 по дисциплине "Информатика" (I семестр). Сут

Vladislav 1 Dec 07, 2021
A synchronous, single-threaded interface for starting processes on Linux

A synchronous, single-threaded interface for starting processes on Linux

Spencer Baugh 27 Jan 28, 2022
Python implementation for Active Directory certificate abuse

Certipy is a Python tool to enumerate and abuse misconfigurations in Active Directory Certificate Services (AD CS). Based on the C# variant Ce

Oliver Lyak 1.3k Jan 09, 2023
Time python - Códigos para auxiliar e mostrar formas de como fazer um relógio e manipular o seu tempo

Time_python Códigos para auxiliar e mostrar formas de como fazer um relógio e manipular o seu tempo. Bibliotecas Nestes foram usadas bibliotecas nativ

Eduardo Henrique 1 Jan 03, 2022
Ontario-Covid19-Screening - An automated Covid-19 School Screening Tool for Ontario

Ontario-Covid19-Screening An automated Covid-19 School Screening Tool for Ontari

Rayan K 0 Feb 20, 2022