Skip to content

Commit c3b3d0e

Browse files
committed
Add packaging scripts for uploading to PyPI
Signed-off-by: Julian Berman <[email protected]>
1 parent 3334c5c commit c3b3d0e

File tree

4 files changed

+45
-0
lines changed

4 files changed

+45
-0
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ release: update_docs
110110
cat asset_id | xargs -I ASSET_ID curl -s -H "Authorization: token $(GITHUB_COM_TOKEN)" -H "Content-Type: application/octet-stream" --data-binary @$(FILEBASE).tar.xz https://uploads.github.com/repos/newren/git-filter-repo/releases/ASSET_ID/assets?name=$(FILEBASE).tar.xz
111111
# Remove temporary file(s)
112112
rm asset_id
113+
# Upload to PyPI, automatically picking up the new tag
114+
cd release && python3 setup.py sdist bdist_wheel
115+
twine upload release/dist/*
113116
# Notify of completion
114117
@echo
115118
@echo === filter-repo $(TAGNAME) created and uploaded to GitHub ===

release/pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[build-system]
2+
requires = [
3+
# The minimum setuptools version is specific to the PEP 517 backend,
4+
# and may be stricter than the version required in `setup.py`
5+
"setuptools>=40.6.0",
6+
"setuptools_scm",
7+
"wheel",
8+
]
9+
build-backend = "setuptools.build_meta"

release/setup.cfg

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[metadata]
2+
name = git-filter-repo
3+
url = https://github.com/newren/git-filter-repo
4+
project_urls =
5+
Source = https://github.com/newren/git-filter-repo
6+
Issues = https://github.com/newren/git-filter-repo/issues/
7+
description = Quickly rewrite git repository history
8+
long_description = file: README.md
9+
classifiers =
10+
Development Status :: 4 - Beta
11+
Operating System :: OS Independent
12+
Programming Language :: Python
13+
License :: OSI Approved :: MIT License
14+
Programming Language :: Python :: 3.5
15+
Programming Language :: Python :: 3.6
16+
Programming Language :: Python :: 3.7
17+
Programming Language :: Python :: 3.8
18+
Programming Language :: Python :: 3
19+
Programming Language :: Python :: Implementation :: CPython
20+
Programming Language :: Python :: Implementation :: PyPy
21+
22+
[options]
23+
scripts = ../git-filter-repo
24+
package_dir =
25+
= ..
26+
py_modules = git_filter_repo
27+
python_requires = >= 3.5
28+
setup_requires = setuptools_scm
29+
30+
[bdist_wheel]
31+
universal = 1

release/setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from setuptools import setup
2+
setup(use_scm_version=dict(root="..", relative_to=__file__))

0 commit comments

Comments
 (0)