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
Pulse sequence builder and compiler for q1asm

q1pulse Pulse sequence builder and compiler for q1asm. q1pulse is a simple library to compile pulse sequence to q1asm, the assembly language of Qblox

Sander de Snoo 3 Dec 14, 2022
Extract continuous and discrete relaxation spectra from G(t)

pyReSpect-time Extract continuous and discrete relaxation spectra from stress relaxation modulus G(t). The papers which describe the method and test c

3 Nov 03, 2022
Never miss a deadline again

Hack the Opportunities Never miss a deadline again! Link to the excel sheet Contribution This list is not complete and I alone cannot make it whole. T

Vibali Joshi 391 Dec 28, 2022
Bring A Trailer(BAT) is a popular online auction website for enthusiast cars. This traverse auction results and saves them as CSV

BaT Data Grabber Bring A Trailer(BAT) is a popular online auction website for enthusiast cars. This traverse auction results and saves them as CSV Bri

Elliot Weil 2 Oct 31, 2021
The bidirectional mapping library for Python.

bidict The bidirectional mapping library for Python. Status bidict: has been used for many years by several teams at Google, Venmo, CERN, Bank of Amer

Joshua Bronson 1.2k Dec 31, 2022
Writeup of NilbinSec's participation in the Winja CTF for c0c0n 2021

Winja-CTF-c0c0n-2021-Writeup NilbinSec's participation in the Winja CTF for c0c0n 2021 This repo covers NilbinSec's participation in the Winja CTF dur

1 Nov 15, 2021
Doom o’clock is a website/project that features a countdown of “when will the earth end” and a greenhouse gas effect emission prediction that’s predicted

Doom o’clock is a website/project that features a countdown of “when will the earth end” and a greenhouse gas effect emission prediction that’s predicted

shironeko(Hazel) 4 Jan 01, 2022
A Python tool to check ASS subtitles for common mistakes and errors.

A Python tool to check ASS subtitles for common mistakes and errors.

1 Dec 18, 2021
Repo with data from local elections in Portugal from 2009 to 2013

autarquicas - local elections in Portugal Repo with data from local elections in Portugal from 2009 to 2013 Objective To provide, to all, raw data fro

Jorge Gomes 6 Apr 06, 2022
使用京东cookie一键生成所有退会链接

JDMemberCloseLinks 本项目旨在使用京东cookie一键生成所有退会链接

hyzaw 68 Jun 10, 2022
全局指针统一处理嵌套与非嵌套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
Tools for collecting social media data around focal events

Social Media Focal Events The focalevents codebase provides tools for organizing data collected around focal events on social media. It is often diffi

Ryan Gallagher 80 Nov 28, 2022
This repository contains Python games that I've worked on. You'll learn how to create python games with AI. I try to focus on creating board games without GUI in Jupyter-notebook.

92_Python_Games 🎮 Introduction 👋 This repository contains Python games that I've worked on. You'll learn how to create python games with AI. I try t

Milaan Parmar / Милан пармар / _米兰 帕尔马 166 Jan 01, 2023
Listen Surah, prepare for next and Endless life...

Al-Quran In this repository, I have linked up all Surah with Arabic-Bangla Audio From Youtube. So, you just need to choose and listen. and the ( surah

SpiderX 1 Sep 30, 2022
A data driven app for bicycle hiring in London(UK)

bicycle_hiring_app_deployed A data driven app for bicycle hiring in London(UK). It predicts expected number of bicycle hire in London. It asks users t

Rajarshi Roy Raju 1 Dec 10, 2021
The repository for AnyMacro: a Fusion360 Add-In

AnyMacro AnyMacro is an Autodesk® Fusion 360™ add-in for chaining multiple commands in a row to form Macros. Macros are created from a set of commands

1 Jan 07, 2022
Team Hash Brown Science4Cast Submission

Team Hash Brown Science4Cast Submission This code reproduces Team Hash Brown's (@princengoc, @Xieyangxinyu) best submission (ee5a) for the competition

3 Feb 02, 2022
This is a practice on Airflow, which is building virtual env, installing Airflow and constructing data pipeline (DAGs)

airflow-test This is a practice on Airflow, which is Builing virtualbox env and setting Airflow on that env Installing Airflow using python virtual en

Jaeyoung 1 Nov 01, 2021
Cvdl-hw2 - Find Contour, Camera Calibration, Augmented Reality and Stereo Disparity Map

opevcvdl-hw2 This project uses openCV and Qt to achieve the requirements. Version Python 3.7 opencv-contrib-python 3.4.2.17 Matplotlib 3.1.1 pyqt5 5.1

Kenny Cheng 3 Aug 17, 2022
Irrigation Component V4 providing support for a custom card

Irrigation Component V4 This release sees the delivery of a custom card https://github.com/petergridge/irrigation_card to render the program options s

12 Oct 28, 2022