Skip to content

Commit

Permalink
FIX: Pin
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Feb 8, 2024
1 parent c1bfdf2 commit 68577b5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/headless-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install numpy
python -m pip install vtk
python -m pip install "vtk<9.3"
python -m pip install pillow
python -m pip install pytest
python -m pip install traitsui==7.2.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-mayavi-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade ${{ matrix.qt-api }} numpy vtk pillow pytest traits pyface traitsui
python -m pip install --upgrade ${{ matrix.qt-api }} numpy "vtk<9.3" pillow pytest traits pyface traitsui
- name: Install mayavi and tvtk
run: python -um pip install -ve .[app]
- name: Test Mayavi package
Expand Down
19 changes: 5 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from setuptools.command.build_py import build_py
from setuptools.command.develop import develop

import io
import os
import time
import subprocess
Expand All @@ -16,11 +15,11 @@
import sys
from os.path import (abspath, basename, dirname, exists, getmtime, isdir,
join, split)
from pathlib import Path

sys.path.append(join(os.path.dirname(__file__), 'tvtk'))
from _setup import can_compile_extensions, gen_tvtk_classes_zip
sys.path.pop(-1)
from tvtk._setup import can_compile_extensions, gen_tvtk_classes_zip # noqa

MY_DIR = os.path.dirname(__file__)
MODE = 'normal'
if len(sys.argv) >= 2 and \
('--help' in sys.argv[1:] or
Expand Down Expand Up @@ -196,8 +195,7 @@ def list_doc_projects():
""" List the different source directories under DEFAULT_INPUT_DIR
for which we have docs.
"""
source_dir = join(abspath(dirname(__file__)),
DEFAULT_INPUT_DIR)
source_dir = join(abspath(MY_PATH), DEFAULT_INPUT_DIR)
source_list = os.listdir(source_dir)
# Check to make sure we're using non-hidden directories.
source_dirs = [listing for listing in source_list
Expand Down Expand Up @@ -239,7 +237,6 @@ def _tvtk_built_recently(zipfile, delay):

# Our custom distutils hooks
def build_tvtk_classes_zip():
MY_DIR = os.path.dirname(__file__)
zipfile = os.path.join(MY_DIR, 'tvtk', 'tvtk_classes.zip')
if _tvtk_built_recently(zipfile, delay=120):
print("Already built tvtk_classes.zip")
Expand All @@ -261,13 +258,7 @@ class MyDevelop(develop):
"""A hook to build the TVTK ZIP file on develop."""

def run(self):
# Make sure that the 'build_src' command will
# always be inplace when we do a 'develop'.
self.reinitialize_command('build_ext', inplace=1)

# tvtk_classes.zip always need to be created on 'develop'.
build_tvtk_classes_zip()

super().run()


Expand Down Expand Up @@ -393,7 +384,7 @@ def run(self):
ext_modules=ext_modules,
install_requires=info['__requires__'],
license="BSD",
long_description=io.open('README.rst', encoding='utf-8').read(),
long_description=Path('README.rst').read_text(encoding='utf-8'),
platforms=["Windows", "Linux", "Mac OS-X", "Unix", "Solaris"],
zip_safe=False,
)

0 comments on commit 68577b5

Please sign in to comment.