Skip to content

Commit b69a0df

Browse files
committed
Remove setuptools_scm from dependency and switch back to manual versioning
1 parent 4104cc3 commit b69a0df

File tree

11 files changed

+32
-65
lines changed

11 files changed

+32
-65
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: [ 3.6, 3.7, 3.8, 3.9 ]
14+
python-version: [ 3.7, 3.8, 3.9 ]
1515
steps:
1616
- uses: actions/checkout@v2
1717
- name: Create ArangoDB Docker container

.github/workflows/pypi.yaml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,3 @@ localdata/
114114

115115
# Node Modules
116116
node_modules/
117-
118-
# setuptools_scm
119-
arango/version.py

.pre-commit-config.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,21 @@ repos:
1212
- id: end-of-file-fixer
1313
- id: mixed-line-ending
1414
- repo: https://github.com/psf/black
15-
rev: 20.8b1
15+
rev: 22.3.0
1616
hooks:
1717
- id: black
1818
- repo: https://github.com/timothycrosley/isort
19-
rev: 5.7.0
19+
rev: 5.10.1
2020
hooks:
2121
- id: isort
2222
args: [ --profile, black ]
2323
- repo: https://github.com/pre-commit/mirrors-mypy
24-
rev: v0.790
24+
rev: v0.931
2525
hooks:
2626
- id: mypy
2727
files: ^arango/
28+
additional_dependencies: ['types-requests']
2829
- repo: https://gitlab.com/pycqa/flake8
29-
rev: 3.8.4
30+
rev: 4.0.1
3031
hooks:
3132
- id: flake8

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![codecov](https://codecov.io/gh/ArangoDB-Community/python-arango/branch/main/graph/badge.svg?token=M8zrjrzsUY)](https://codecov.io/gh/ArangoDB-Community/python-arango)
66
[![PyPI version](https://badge.fury.io/py/python-arango.svg)](https://badge.fury.io/py/python-arango)
77
[![GitHub license](https://img.shields.io/github/license/ArangoDB-Community/python-arango?color=brightgreen)](https://github.com/ArangoDB-Community/python-arango/blob/main/LICENSE)
8-
![Python version](https://img.shields.io/badge/python-3.6%2B-blue)
8+
![Python version](https://img.shields.io/badge/python-3.7%2B-blue)
99

1010
# Python-Arango
1111

@@ -15,12 +15,12 @@ database natively supporting documents, graphs and search.
1515
## Requirements
1616

1717
- ArangoDB version 3.7+
18-
- Python version 3.6+
18+
- Python version 3.7+
1919

2020
## Installation
2121

2222
```shell
23-
pip install python-arango
23+
pip install python-arango --upgrade
2424
```
2525

2626
## Getting Started

arango/client.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
from json import dumps, loads
44
from typing import Any, Callable, Optional, Sequence, Union
55

6-
from pkg_resources import get_distribution
7-
86
from arango.connection import (
97
BasicConnection,
108
Connection,
@@ -20,6 +18,7 @@
2018
RoundRobinHostResolver,
2119
SingleHostResolver,
2220
)
21+
from arango.version import version
2322

2423

2524
class ArangoClient:
@@ -101,7 +100,7 @@ def version(self) -> str:
101100
:return: Client version.
102101
:rtype: str
103102
"""
104-
return get_distribution("python-arango").version
103+
return version
105104

106105
def db(
107106
self,

arango/version.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version = "7.3.2"

docs/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ Requirements
1111
=============
1212

1313
- ArangoDB version 3.7+
14-
- Python version 3.6+
14+
- Python version 3.7+
1515

1616
Installation
1717
============
1818

1919
.. code-block:: bash
2020
21-
~$ pip install python-arango
21+
~$ pip install python-arango --upgrade
2222
2323
Contents
2424
========

pyproject.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[build-system]
22
requires = [
33
"setuptools>=42",
4-
"setuptools_scm[toml]>=3.4",
54
"wheel",
65
]
76
build-backend = "setuptools.build_meta"
@@ -21,5 +20,8 @@ addopts = "-s -vv -p no:warnings"
2120
minversion = "6.0"
2221
testpaths = ["tests"]
2322

24-
[tool.setuptools_scm]
25-
write_to = "arango/version.py"
23+
[tool.mypy]
24+
warn_return_any = true
25+
warn_unused_configs = true
26+
ignore_missing_imports = true
27+
strict = true

setup.cfg

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,3 @@ max-line-length = 88
33
extend-ignore = E203, E741, W503
44
exclude =.git .idea .*_cache dist htmlcov venv
55
per-file-ignores = __init__.py:F401
6-
7-
[mypy]
8-
ignore_missing_imports = True
9-
strict = True

setup.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,42 @@
33
with open("./README.md") as fp:
44
long_description = fp.read()
55

6+
version = {}
7+
with open("./arango/version.py") as fp:
8+
exec(fp.read(), version)
9+
610
setup(
711
name="python-arango",
812
description="Python Driver for ArangoDB",
913
long_description=long_description,
1014
long_description_content_type="text/markdown",
15+
version=version["version"],
1116
author="Joohwan Oh",
1217
author_email="joohwan.oh@outlook.com",
1318
url="https://github.com/ArangoDB-Community/python-arango",
1419
keywords=["arangodb", "python", "driver"],
1520
packages=find_packages(exclude=["tests"]),
1621
include_package_data=True,
17-
python_requires=">=3.6",
22+
python_requires=">=3.7",
1823
license="MIT",
19-
use_scm_version=True,
20-
setup_requires=["setuptools_scm"],
2124
install_requires=[
2225
"urllib3>=1.26.0",
2326
"dataclasses>=0.6; python_version < '3.7'",
2427
"requests",
2528
"requests_toolbelt",
2629
"PyJWT",
2730
"setuptools>=42",
28-
"setuptools_scm[toml]>=3.4",
2931
],
3032
extras_require={
3133
"dev": [
32-
"black",
33-
"flake8>=3.8.4",
34-
"isort>=5.0.0",
35-
"mypy>=0.790",
34+
"black>=22.3.0",
35+
"flake8>=4.0.1",
36+
"isort>=5.10.1",
37+
"mypy>=0.942",
3638
"mock",
37-
"pre-commit>=2.9.3",
38-
"pytest>=6.0.0",
39-
"pytest-cov>=2.0.0",
39+
"pre-commit>=2.17.0",
40+
"pytest>=7.1.1",
41+
"pytest-cov>=3.0.0",
4042
"sphinx",
4143
"sphinx_rtd_theme",
4244
"types-pkg_resources",

0 commit comments

Comments
 (0)