Skip to content

Commit 7846ac3

Browse files
adehadfdebrabander
andauthored
Remove setup.py and tidy build scripts (#1443)
* Remove setup_requires for setuptools_scm_git_archive This dependency is not needed. The documentation at https://github.com/Changaco/setuptools_scm_git_archive states that there are two files needed for this to work .git_archival.txt and .gitattributes. Both files are missing in this repository. See also #1365 * bump setuptools_scm * move to pyproject * revert to setup.cfg, removing setup.py * revert tox to see if that fixes test? * more file deletes * isolated build * add tests.py to pytest files * revert pyup as we still have a GHA, that runs on main Co-authored-by: Frank de Brabander <[email protected]>
1 parent 49d52ad commit 7846ac3

12 files changed

+44
-393
lines changed

.fossa.yml

-16
This file was deleted.

.gitchangelog.rc

-37
This file was deleted.

.nvmrc

-1
This file was deleted.

Makefile

-108
This file was deleted.

bindep.txt

-4
This file was deleted.

docs/Makefile

-154
This file was deleted.

jira/jirashell.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,8 @@ def handle_basic_auth(auth, server):
302302
else:
303303
print("Getting password from keyring...")
304304
password = keyring.get_password(server, auth["username"])
305-
assert password, "No password provided!"
305+
if not password:
306+
raise ValueError("No password provided!")
306307
return auth["username"], password
307308

308309

pyproject.toml

+37-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,39 @@
11
[build-system]
2-
requires = [
3-
"setuptools >= 41.0.0",
4-
"setuptools_scm >= 1.15.0",
5-
"setuptools_scm_git_archive >= 1.0",
6-
"wheel",
7-
]
2+
requires = ["setuptools >= 60.0.0", "setuptools_scm[toml] >= 7.0.0"]
83
build-backend = "setuptools.build_meta"
9-
[project]
10-
requires-python = ">=3.8"
4+
5+
# Setuptools config
6+
# Equivalent to use_scm_version=True
7+
[tool.setuptools_scm]
8+
9+
# Tool Config
10+
[tool.isort]
11+
profile = "black"
12+
src_paths = ["jira", "tests"]
13+
14+
15+
[tool.pytest.ini_options]
16+
minversion = "6.0"
17+
testpaths = ["tests"]
18+
python_files = ["test_*.py", "tests.py"]
19+
addopts = '''-p no:xdist --durations=10 --tb=long -rxX -v --color=yes
20+
--junitxml=build/results.xml
21+
--cov-report=xml --cov jira'''
22+
23+
# these are important for distributed testing, to speedup their execution we minimize what we sync
24+
rsyncdirs = ". jira demo docs"
25+
rsyncignore = ".git"
26+
27+
# pytest-timeout, delete_project on jira cloud takes >70s
28+
timeout = 80
29+
30+
# avoid useless warnings related to coverage skips
31+
filterwarnings = ["ignore::pytest.PytestWarning"]
32+
33+
markers = ["allow_on_cloud: opt in for the test to run on Jira Cloud"]
34+
35+
36+
[tool.mypy]
37+
python_version = 3.8
38+
warn_unused_configs = true
39+
namespace_packages = true

0 commit comments

Comments
 (0)