mirror of
https://github.com/arsenetar/send2trash.git
synced 2026-01-25 16:11:39 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 32d3391b1a | |||
| 2109d6e518 | |||
|
|
0b6b2fe5b0 | ||
| 9615b7e4f8 | |||
| 34c0ddaa88 | |||
| 8cc111a446 | |||
|
|
f8a40143f6 |
28
.github/workflows/default.yml
vendored
28
.github/workflows/default.yml
vendored
@@ -2,7 +2,11 @@
|
||||
|
||||
name: Default CI/CD
|
||||
|
||||
on: push
|
||||
on:
|
||||
push:
|
||||
branches: ["**"]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
@@ -70,3 +74,25 @@ jobs:
|
||||
- name: Run tests
|
||||
run: |
|
||||
pytest
|
||||
build:
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref == 'refs/heads/master'
|
||||
steps:
|
||||
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||
- name: Set up Python 3.x
|
||||
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
|
||||
with:
|
||||
python-version: 3.x
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip setuptools build
|
||||
- name: Build package
|
||||
run: |
|
||||
python -m build
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
||||
with:
|
||||
name: dist
|
||||
path: dist/
|
||||
if-no-files-found: error
|
||||
|
||||
32
.github/workflows/publish.yml
vendored
Normal file
32
.github/workflows/publish.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
name: Publish
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '[0-9]+.[0-9]+.[0-9]+'
|
||||
|
||||
jobs:
|
||||
pypi-publish:
|
||||
name: Upload to PyPI
|
||||
runs-on: ubuntu-latest
|
||||
environment: pypi
|
||||
permissions:
|
||||
# IMPORTANT: this permission is mandatory for Trusted Publishing
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Get artifact run
|
||||
id: get_artifact_run
|
||||
run: |
|
||||
RUN_ID=$(gh run list --workflow "Default CI/CD" --branch master --commit "${{ github.sha }}" --status completed --limit 1 --json databaseId --jq ".[].databaseId")
|
||||
if [ -z "$RUN_ID" ]; then
|
||||
echo "No completed workflow run found for commit ${{ github.sha }}"
|
||||
exit 1
|
||||
fi
|
||||
echo "run=$RUN_ID" >> $GITHUB_OUTPUT
|
||||
- name: Fetch build artifacts
|
||||
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
|
||||
with:
|
||||
name: dist
|
||||
run-id: ${{ steps.get_artifact_run.outputs.run }}
|
||||
- name: Publish package distributions to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
|
||||
@@ -1,5 +1,11 @@
|
||||
Changes
|
||||
=======
|
||||
Version 2.1.0 -- 2026/01/14
|
||||
---------------------------
|
||||
* Add `conftest.py` to source distribution by @mgorny in https://github.com/arsenetar/send2trash/pull/106
|
||||
* Replacing elif, which is always True, with else by @PalmtopTiger in https://github.com/arsenetar/send2trash/pull/104
|
||||
* Migrate to pyproject.toml from setup.cfg
|
||||
|
||||
Version 2.0.0 -- 2025/12/30
|
||||
---------------------------
|
||||
* Drop suport for Python 2
|
||||
|
||||
@@ -1 +1 @@
|
||||
include CHANGES.rst LICENSE
|
||||
include CHANGES.rst LICENSE tests/conftest.py
|
||||
|
||||
@@ -2,5 +2,53 @@
|
||||
requires = ["setuptools >= 75.3.1"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "Send2Trash"
|
||||
version = "2.1.0"
|
||||
description = "Send file to trash natively under Mac OS X, Windows and Linux"
|
||||
readme = "README.rst"
|
||||
license = "BSD-3-Clause"
|
||||
license-files = ["LICENSE"]
|
||||
authors = [
|
||||
{name = "Andrew Senetar", email = "arsenetar@voltaicideas.net"},
|
||||
]
|
||||
classifiers = [
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
"Intended Audience :: Developers",
|
||||
"Operating System :: MacOS :: MacOS X",
|
||||
"Operating System :: Microsoft :: Windows",
|
||||
"Operating System :: POSIX",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Programming Language :: Python :: 3.13",
|
||||
"Programming Language :: Python :: 3.14",
|
||||
"Topic :: Desktop Environment :: File Managers"
|
||||
]
|
||||
requires-python = ">=3.8"
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://github.com/arsenetar/send2trash"
|
||||
Repository = "https://github.com/arsenetar/send2trash.git"
|
||||
Issues = "https://github.com/arsenetar/send2trash/issues"
|
||||
|
||||
[project.scripts]
|
||||
send2trash = "send2trash.__main__:main"
|
||||
|
||||
[project.optional-dependencies]
|
||||
test = [
|
||||
"pytest >= 8",
|
||||
]
|
||||
nativelib = [
|
||||
"pywin32 >= 305; sys_platform == 'win32'",
|
||||
"pyobjc >= 9.0; sys_platform == 'darwin'",
|
||||
]
|
||||
|
||||
[tool.black]
|
||||
line-length = 120
|
||||
|
||||
[tool.isort]
|
||||
profile = "black"
|
||||
|
||||
@@ -12,7 +12,7 @@ import collections.abc
|
||||
def preprocess_paths(paths):
|
||||
if isinstance(paths, collections.abc.Iterable) and not isinstance(paths, (str, bytes)):
|
||||
paths = list(paths)
|
||||
elif not isinstance(paths, list):
|
||||
else:
|
||||
paths = [paths]
|
||||
# Convert items such as pathlib paths to strings
|
||||
return [os.fspath(path) for path in paths]
|
||||
|
||||
51
setup.cfg
51
setup.cfg
@@ -1,51 +0,0 @@
|
||||
[metadata]
|
||||
name = Send2Trash
|
||||
version = 2.0.0
|
||||
url = https://github.com/arsenetar/send2trash
|
||||
project_urls =
|
||||
Bug Reports = https://github.com/arsenetar/send2trash/issues
|
||||
author = Andrew Senetar
|
||||
author_email = arsenetar@voltaicideas.net
|
||||
license = BSD License
|
||||
license_files = LICENSE
|
||||
description = Send file to trash natively under Mac OS X, Windows and Linux
|
||||
long_description = file:README.rst
|
||||
long_description_content_type = text/x-rst
|
||||
classifiers =
|
||||
Development Status :: 5 - Production/Stable
|
||||
Intended Audience :: Developers
|
||||
License :: OSI Approved :: BSD License
|
||||
Operating System :: MacOS :: MacOS X
|
||||
Operating System :: Microsoft :: Windows
|
||||
Operating System :: POSIX
|
||||
Programming Language :: Python :: 3
|
||||
Programming Language :: Python :: 3.8
|
||||
Programming Language :: Python :: 3.9
|
||||
Programming Language :: Python :: 3.10
|
||||
Programming Language :: Python :: 3.11
|
||||
Programming Language :: Python :: 3.12
|
||||
Programming Language :: Python :: 3.13
|
||||
Programming Language :: Python :: 3.14
|
||||
Topic :: Desktop Environment :: File Managers
|
||||
|
||||
[options]
|
||||
packages = find:
|
||||
tests_require = pytest
|
||||
python_requires = !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*, !=3.7.*
|
||||
|
||||
[options.packages.find]
|
||||
include=
|
||||
send2trash*
|
||||
|
||||
[options.extras_require]
|
||||
win32 =
|
||||
pywin32; sys_platform == "win32"
|
||||
objc =
|
||||
pyobjc-framework-Cocoa; sys_platform == "darwin"
|
||||
nativeLib =
|
||||
pywin32; sys_platform == "win32"
|
||||
pyobjc-framework-Cocoa; sys_platform == "darwin"
|
||||
|
||||
[options.entry_points]
|
||||
console_scripts =
|
||||
send2trash = send2trash.__main__:main
|
||||
Reference in New Issue
Block a user