-
-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Packaging: Use
versioningit
for maintaining the package version
The Debian package builder has been saved to `bin/mkdeb.py` for now. It needs to be refurbished into a `poethepoet` task subsequently.
- Loading branch information
Showing
7 changed files
with
66 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# ruff: noqa: S605, S607 | ||
""" | ||
Build and publish a .deb package. | ||
https://pypi.python.org/pypi/stdeb/0.8.5#quickstart-2-just-tell-me-the-fastest-way-to-make-a-deb | ||
""" | ||
|
||
import os | ||
from shutil import rmtree | ||
|
||
here = os.path.abspath(os.path.dirname(__file__)) | ||
|
||
|
||
def get_version(): | ||
import responder | ||
|
||
return responder.__version__ | ||
|
||
|
||
def run(): | ||
version = get_version() | ||
try: | ||
print("Removing previous builds") | ||
rmtree(os.path.join(here, "deb_dist")) | ||
except FileNotFoundError: | ||
pass | ||
print("Creating Debian package manifest") | ||
os.system( | ||
"python setup.py --command-packages=stdeb.command sdist_dsc " | ||
"-z artful --package3=pipenv --depends3=python3-virtualenv-clone" | ||
) | ||
print("Building .deb") | ||
os.chdir(f"deb_dist/pipenv-{version}") | ||
os.system("dpkg-buildpackage -rfakeroot -uc -us") | ||
|
||
|
||
if __name__ == "__main__": | ||
run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
from importlib.metadata import PackageNotFoundError, version | ||
|
||
from . import ext | ||
from .core import API, Request, Response | ||
|
||
try: | ||
__version__ = version("responder") | ||
except PackageNotFoundError: # pragma: no cover | ||
__version__ = "unknown" | ||
|
||
__all__ = [ | ||
"API", | ||
"Request", | ||
"Response", | ||
"ext", | ||
"__version__", | ||
] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters