-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpython_pypi_dist_manager.py
54 lines (45 loc) · 1.47 KB
/
python_pypi_dist_manager.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2020 Shlomi Fish <[email protected]>
#
# Distributed under the terms of the MIT license.
import os
import os.path
from pydistman import DistManager
class Derived(DistManager):
"""docstring for Derived"""
def _fmt_unlink(self, fn_proto):
"""rmtree the formatted fn_proto if it exists."""
fn = self._myformat(fn_proto)
if os.path.exists(fn):
os.unlink(fn)
def _build_only_command_custom_steps(self):
# Fix/workaround for https://github.com/shlomif/pysol_cards/issues/9
#
# This issue may probably affect other pydistman-based distributions:
#
# https://github.com/shlomif/pydistman
self._fmt_unlink("{dest_dir}/release")
self._fmt_unlink("{dest_dir}/pysol_cards/__main__.py")
self._fmt_unlink("{dest_dir}/pysol_cards/template.py")
self._fmt_unlink("{dest_dir}/tests/__init__.py")
self._fmt_unlink("{dest_dir}/tests/test_sanity.py")
dist_name = "pysol_cards"
obj = Derived(
dist_name=dist_name,
dist_version="0.18.1",
project_name="pysol_cards",
project_short_description="Deal PySol FC Cards",
release_date="2025-02-11",
project_year="2020",
full_name="Shlomi Fish",
github_username="shlomif",
filter_test_reqs=True,
tox_envlist="py313",
entry_point="none",
)
obj.cli_run()