Skip to content

Commit

Permalink
Remove imp dependency and test on python 3.12 (#673)
Browse files Browse the repository at this point in the history
* Remove imp dependency and test on python 3.12

* inline version

* one more tweak

* do not lint on 3.12
  • Loading branch information
mgyucht authored Oct 5, 2023
1 parent 682dc6f commit 7f5cafd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- '3.9'
- '3.10'
- '3.11'

- '3.12'
env:
PYTHON_VERSION: ${{ matrix.python-version }}
steps:
Expand All @@ -29,7 +29,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install pip
run: pip install --upgrade pip
run: pip install --upgrade pip setuptools

- name: Install development dependencies
run: pip install --upgrade -r dev-requirements.txt
Expand All @@ -41,6 +41,7 @@ jobs:
run: pytest tests --cov=./

- name: Run lint
if: matrix.python-version != '3.12' # new lint rules in 3.12 don't pass
run: prospector --profile ./prospector.yaml -t dodgy -t mccabe -t profile-validator -t pyflakes -t pylint

- name: Run rstcheck
Expand All @@ -61,7 +62,7 @@ jobs:
- '3.9'
- '3.10'
- '3.11'

- '3.12'
env:
PYTHON_VERSION: ${{ matrix.python-version }}
steps:
Expand All @@ -74,7 +75,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install pip
run: pip install --upgrade pip
run: pip install --upgrade pip setuptools

- name: Install dependencies
run: |
Expand Down
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import imp
import io
import os
from setuptools import setup, find_packages
from importlib.machinery import SourceFileLoader

version = imp.load_source(
'databricks_cli.version', os.path.join('databricks_cli', 'version.py')).version
path_to_module = os.path.join('databricks_cli', 'version.py')
loaded_module = SourceFileLoader('databricks_cli.version', path_to_module).load_module()
version = loaded_module.version

setup(
name='databricks-cli',
Expand Down

0 comments on commit 7f5cafd

Please sign in to comment.