Skip to content

Commit

Permalink
Move to src, add bulding to pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaBeloglazov committed Sep 28, 2023
1 parent fcf5e82 commit a4a2e77
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Mark version
run: python3 tags_marker.py
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
30 changes: 30 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "clipman"
version = "!!{PLACEHOLDER}!!"
authors = [
{name="NikitaBeloglazov", email="nnikita.beloglazov@gmail.com"},
]
description = "Python3 module for working with clipboard. Currently read-only interaction. Created because pyperclip is discontinued."
readme = "README.md"
license = {text = "MPL 2.0 License"}

requires-python = ">=3.9"
dependencies = []

keywords = ["clipman", "clipboard", "copy", "paste", "xclip"]

classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries :: Python Modules"
]

[project.urls]
"Homepage" = "https://github.com/NikitaBeloglazov/clipman"
"Bug Tracker" = "https://github.com/NikitaBeloglazov/clipman/issues"
File renamed without changes.
7 changes: 7 additions & 0 deletions src/clipman/__version__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"""
Created for storing version number.
The version number will be placed here based on the tag in Github using the tags_marker.py script.
Having "!!{PLACEHOLDER}!!" in final releases is NOT allowed.
"""
__version__="!!{PLACEHOLDER}!!"
File renamed without changes.
File renamed without changes.

0 comments on commit a4a2e77

Please sign in to comment.