Skip to content

Commit

Permalink
Remove setup.py and tidy build scripts (#1443)
Browse files Browse the repository at this point in the history
* 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 <debrabander@gmail.com>
  • Loading branch information
adehad and fdebrabander authored Sep 5, 2022
1 parent 49d52ad commit 7846ac3
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 393 deletions.
16 changes: 0 additions & 16 deletions .fossa.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .gitchangelog.rc

This file was deleted.

1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

108 changes: 0 additions & 108 deletions Makefile

This file was deleted.

4 changes: 0 additions & 4 deletions bindep.txt

This file was deleted.

154 changes: 0 additions & 154 deletions docs/Makefile

This file was deleted.

3 changes: 2 additions & 1 deletion jira/jirashell.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ def handle_basic_auth(auth, server):
else:
print("Getting password from keyring...")
password = keyring.get_password(server, auth["username"])
assert password, "No password provided!"
if not password:
raise ValueError("No password provided!")
return auth["username"], password


Expand Down
45 changes: 37 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,39 @@
[build-system]
requires = [
"setuptools >= 41.0.0",
"setuptools_scm >= 1.15.0",
"setuptools_scm_git_archive >= 1.0",
"wheel",
]
requires = ["setuptools >= 60.0.0", "setuptools_scm[toml] >= 7.0.0"]
build-backend = "setuptools.build_meta"
[project]
requires-python = ">=3.8"

# Setuptools config
# Equivalent to use_scm_version=True
[tool.setuptools_scm]

# Tool Config
[tool.isort]
profile = "black"
src_paths = ["jira", "tests"]


[tool.pytest.ini_options]
minversion = "6.0"
testpaths = ["tests"]
python_files = ["test_*.py", "tests.py"]
addopts = '''-p no:xdist --durations=10 --tb=long -rxX -v --color=yes
--junitxml=build/results.xml
--cov-report=xml --cov jira'''

# these are important for distributed testing, to speedup their execution we minimize what we sync
rsyncdirs = ". jira demo docs"
rsyncignore = ".git"

# pytest-timeout, delete_project on jira cloud takes >70s
timeout = 80

# avoid useless warnings related to coverage skips
filterwarnings = ["ignore::pytest.PytestWarning"]

markers = ["allow_on_cloud: opt in for the test to run on Jira Cloud"]


[tool.mypy]
python_version = 3.8
warn_unused_configs = true
namespace_packages = true
Loading

0 comments on commit 7846ac3

Please sign in to comment.