Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for 2.3.0 release #1355

Merged
merged 1 commit into from
Jun 27, 2023
Merged

Updates for 2.3.0 release #1355

merged 1 commit into from
Jun 27, 2023

Conversation

jmwright
Copy link
Member

@lorenzncode @adam-urbanczyk Please take a look when you get a chance. Once this is merged I'll move forward with the rest of the release process.

I've followed the developer doc here when creating this.

@codecov
Copy link

codecov bot commented Jun 26, 2023

Codecov Report

Merging #1355 (6582c4e) into master (b96eb8a) will not change coverage.
The diff coverage is 0.00%.

❗ Current head 6582c4e differs from pull request most recent head fc609bf. Consider uploading reports for the commit fc609bf to get more accurate results

@@           Coverage Diff           @@
##           master    #1355   +/-   ##
=======================================
  Coverage   94.16%   94.16%           
=======================================
  Files          26       26           
  Lines        5584     5584           
  Branches      954      954           
=======================================
  Hits         5258     5258           
  Misses        194      194           
  Partials      132      132           
Impacted Files Coverage Δ
cadquery/__init__.py 87.50% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@adam-urbanczyk adam-urbanczyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM!

@jmwright jmwright merged commit 96b36a7 into master Jun 27, 2023
@jmwright
Copy link
Member Author

I've tried on two Linux systems (including a clean Ubuntu VM) and it appears that pip is not installing any dependencies with the 2.3.0 package. Can anyone confirm that?

@sethfischer
Copy link
Contributor

@jmwright confirmed that dependencies are not installed

$ python3.9 -m venv .venv
$ source .venv/bin/activate
$ pip install -U Pip
Collecting Pip
  Downloading pip-23.1.2-py3-none-any.whl (2.1 MB)
     |████████████████████████████████| 2.1 MB 12.0 MB/s 
Installing collected packages: Pip
  Attempting uninstall: Pip
    Found existing installation: pip 20.0.2
    Uninstalling pip-20.0.2:
      Successfully uninstalled pip-20.0.2
Successfully installed Pip-23.1.2
$ pip install cadquery
Collecting cadquery
  Downloading cadquery-2.3.0-py3-none-any.whl (145 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 145.8/145.8 kB 10.7 MB/s eta 0:00:00
Installing collected packages: cadquery
Successfully installed cadquery-2.3.0
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.6 LTS
Release:	20.04
Codename:	focal

@jmwright
Copy link
Member Author

I wonder if somehow this line is being tripped incorrectly.

@lorenzncode
Copy link
Member

@jmwright Try to repackage? Comparing the pypi version with local python -m build result:

The tar.gz requires.txt file is missing:

cadquery-ocp<7.8,>=7.7.0a0
ezdxf
multimethod<2.0,>=1.7
nlopt
nptyping==2.0.1
typish
casadi
path

Or check the wheel METADATA file for missing Requires-Dist lines:

Requires-Dist: cadquery-ocp (<7.8,>=7.7.0a0)
...

@jmwright
Copy link
Member Author

@lorenzncode I'm not sure why it didn't work the first time. I created a fresh environment, did the build, and now the METADATA looks correct. However, there is still no requires.txt file in the tar.gz file.

PyPI doesn't allow releases to be updated, so I'll have to do a 2.3.1 release I guess. I'll post the testpypi link for testing before I do the full release.

@jmwright
Copy link
Member Author

I forgot that dependencies can't be installed from testpypi. I'll at least make sure it errors out properly about not being able to find cadquery-ocp.

@jmwright
Copy link
Member Author

The package is fixed now, but the nlopt package seems to be having trouble on Python 3.11.2 on Ubuntu 23.04. It works fine in Python 3.10.12 for me though.

Below is the error log I see.

Installing collected packages: typish, cadquery-ocp, typing-extensions, pyparsing, path, numpy, multimethod, nptyping, nlopt, ezdxf, casadi, cadquery
  DEPRECATION: nlopt is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https:/pypa/pip/issues/8559
  Running setup.py install for nlopt ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for nlopt did not run successfully.
  │ exit code: 1
  ╰─> [217 lines of output]
      running install
      /home/jwright/venvs/cq-test/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_ext
      cmake version 3.25.1
      
      CMake suite maintained and supported by Kitware (kitware.com/cmake).
      -- The C compiler identification is GNU 12.2.0
      -- The CXX compiler identification is GNU 12.2.0
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /usr/bin/cc - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: /usr/bin/c++ - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Found PythonInterp: /home/jwright/venvs/cq-test/bin/python3 (found version "3.11.2")
      -- Found Python includes: /usr/include/python3.11
      -- Found Python libs: /usr/lib/x86_64-linux-gnu
      CMake Deprecation Warning at extern/nlopt/CMakeLists.txt:15 (cmake_minimum_required):
        Compatibility with CMake < 2.8.12 will be removed from a future version of
        CMake.
      
        Update the VERSION argument <min> value or use a ...<max> suffix to tell
        CMake that the project does not need compatibility with older versions.
      
      
      -- NLopt version 2.6.2
      -- Looking for dlfcn.h
      -- Looking for dlfcn.h - found
      -- Looking for getopt.h
      -- Looking for getopt.h - found
      -- Looking for unistd.h
      -- Looking for unistd.h - found
      -- Looking for string.h
      -- Looking for string.h - found
      -- Looking for strings.h
      -- Looking for strings.h - found
      -- Looking for inttypes.h
      -- Looking for inttypes.h - found
      -- Looking for memory.h
      -- Looking for memory.h - found
      -- Looking for stdlib.h
      -- Looking for stdlib.h - found
      -- Looking for stdint.h
      -- Looking for stdint.h - found
      -- Looking for time.h
      -- Looking for time.h - found
      -- Looking for sys/types.h
      -- Looking for sys/types.h - found
      -- Looking for sys/stat.h
      -- Looking for sys/stat.h - found
      -- Looking for sys/time.h
      -- Looking for sys/time.h - found
      -- Looking for getpid
      -- Looking for getpid - found
      -- Looking for syscall
      -- Looking for syscall - found
      -- Looking for isinf
      -- Looking for isinf - found
      -- Looking for isnan
      -- Looking for isnan - found
      -- Looking for gettimeofday
      -- Looking for gettimeofday - found
      -- Looking for qsort_r
      -- Looking for qsort_r - found
      -- Looking for time
      -- Looking for time - found
      -- Looking for copysign
      -- Looking for copysign - found
      -- Looking for stddef.h
      -- Looking for stddef.h - found
      -- Check size of uint32_t
      -- Check size of uint32_t - done
      -- Check size of unsigned int
      -- Check size of unsigned int - done
      -- Check size of unsigned long
      -- Check size of unsigned long - done
      -- Looking for sqrt in m
      -- Looking for sqrt in m - found
      -- Looking for fpclassify
      -- Looking for fpclassify - TRUE
      -- Performing Test HAVE_THREAD_LOCAL_STORAGE
      -- Performing Test HAVE_THREAD_LOCAL_STORAGE - Success
      -- Performing Test HAVE_THREAD_LOCAL_STORAGE
      -- Performing Test HAVE_THREAD_LOCAL_STORAGE - Failed
      -- Looking for __cplusplus
      -- Looking for __cplusplus - found
      -- Performing Test SUPPORTS_STDCXX11
      -- Performing Test SUPPORTS_STDCXX11 - Success
      -- Performing Test HAS_FPIC
      -- Performing Test HAS_FPIC - Success
      -- Found PythonLibs: /usr/lib/x86_64-linux-gnu (found suitable exact version "3.11.2")
      -- Found NumPy: /home/jwright/venvs/cq-test/lib/python3.11/site-packages/numpy/core/include (found version "1.25.0")
      -- Could NOT find Guile (missing: GUILE_EXECUTABLE GUILE_ROOT_DIR GUILE_INCLUDE_DIRS GUILE_LIBRARIES)
      -- Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR)
      -- Could NOT find Octave (missing: OCTAVE_EXECUTABLE OCTAVE_ROOT_DIR OCTAVE_INCLUDE_DIRS OCTAVE_LIBRARIES)
      -- Could NOT find Matlab (missing: Matlab_INCLUDE_DIRS Matlab_MEX_LIBRARY Matlab_MEX_EXTENSION Matlab_ROOT_DIR Matlab_MX_LIBRARY MX_LIBRARY MAIN_PROGRAM) (found version "NOTFOUND")
      -- Configuring done
      -- Generating done
      -- Build files have been written to: /tmp/pip-install-zlfqxldu/nlopt_6df9132acef84f0d8e1a2ec5c47c2a4e/build/temp.linux-x86_64-cpython-311
      [  1%] Generating nlopt.hpp
      [  3%] Generating nlopt.f
      CMake Deprecation Warning at /tmp/pip-install-zlfqxldu/nlopt_6df9132acef84f0d8e1a2ec5c47c2a4e/extern/nlopt/cmake/generate-cpp.cmake:1 (cmake_minimum_required):
        Compatibility with CMake < 2.8.12 will be removed from a future version of
        CMake.
      
        Update the VERSION argument <min> value or use a ...<max> suffix to tell
        CMake that the project does not need compatibility with older versions.
      
      
      CMake Deprecation Warning at /tmp/pip-install-zlfqxldu/nlopt_6df9132acef84f0d8e1a2ec5c47c2a4e/extern/nlopt/cmake/generate-fortran.cmake:1 (cmake_minimum_required):
        Compatibility with CMake < 2.8.12 will be removed from a future version of
        CMake.
      
        Update the VERSION argument <min> value or use a ...<max> suffix to tell
        CMake that the project does not need compatibility with older versions.
      
      
      [  3%] Built target generate-fortran
      [  3%] Built target generate-cpp
      [  7%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/direct/DIRect.c.o
      [  7%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/direct/direct_wrap.c.o
      [  9%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/direct/DIRserial.c.o
      [ 11%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/direct/DIRsubrout.c.o
      [ 13%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/cdirect/cdirect.c.o
      [ 15%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/cdirect/hybrid.c.o
      [ 17%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/praxis/praxis.c.o
      [ 19%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/luksan/plis.c.o
      [ 21%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/luksan/plip.c.o
      [ 23%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/luksan/pnet.c.o
      [ 25%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/luksan/mssubs.c.o
      [ 27%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/luksan/pssubs.c.o
      [ 29%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/crs/crs.c.o
      [ 31%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/mlsl/mlsl.c.o
      [ 33%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/mma/mma.c.o
      [ 35%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/mma/ccsa_quadratic.c.o
      [ 37%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/cobyla/cobyla.c.o
      [ 39%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/newuoa/newuoa.c.o
      [ 41%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/neldermead/nldrmd.c.o
      [ 43%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/neldermead/sbplx.c.o
      [ 45%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/auglag/auglag.c.o
      [ 47%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/bobyqa/bobyqa.c.o
      [ 49%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/isres/isres.c.o
      [ 50%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/slsqp/slsqp.c.o
      [ 52%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/esch/esch.c.o
      [ 54%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/api/general.c.o
      [ 56%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/api/options.c.o
      [ 58%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/api/optimize.c.o
      [ 60%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/api/deprecated.c.o
      [ 62%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/api/f77api.c.o
      [ 64%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/util/mt19937ar.c.o
      [ 66%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/util/sobolseq.c.o
      [ 68%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/util/timer.c.o
      [ 70%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/util/stop.c.o
      [ 72%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/util/redblack.c.o
      [ 74%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/util/qsort_r.c.o
      [ 76%] Building C object extern/nlopt/CMakeFiles/nlopt.dir/src/util/rescale.c.o
      [ 78%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/stogo/global.cc.o
      [ 80%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/stogo/linalg.cc.o
      [ 82%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/stogo/local.cc.o
      [ 84%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/stogo/stogo.cc.o
      [ 86%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/stogo/tools.cc.o
      [ 88%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/ags/evolvent.cc.o
      [ 90%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/ags/solver.cc.o
      [ 92%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/ags/local_optimizer.cc.o
      [ 94%] Building CXX object extern/nlopt/CMakeFiles/nlopt.dir/src/algs/ags/ags.cc.o
      [ 96%] Linking CXX static library libnlopt.a
      [100%] Built target nlopt
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-zlfqxldu/nlopt_6df9132acef84f0d8e1a2ec5c47c2a4e/setup.py", line 85, in <module>
          setup(
        File "/home/jwright/venvs/cq-test/lib/python3.11/site-packages/setuptools/__init__.py", line 108, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/jwright/venvs/cq-test/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/home/jwright/venvs/cq-test/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/home/jwright/venvs/cq-test/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/home/jwright/venvs/cq-test/lib/python3.11/site-packages/setuptools/dist.py", line 1213, in run_command
          super().run_command(command)
        File "/home/jwright/venvs/cq-test/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/jwright/venvs/cq-test/lib/python3.11/site-packages/setuptools/command/install.py", line 68, in run
          return orig.install.run(self)
                 ^^^^^^^^^^^^^^^^^^^^^^
        File "/home/jwright/venvs/cq-test/lib/python3.11/site-packages/setuptools/_distutils/command/install.py", line 698, in run
          self.run_command('build')
        File "/home/jwright/venvs/cq-test/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/jwright/venvs/cq-test/lib/python3.11/site-packages/setuptools/dist.py", line 1213, in run_command
          super().run_command(command)
        File "/home/jwright/venvs/cq-test/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/jwright/venvs/cq-test/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 132, in run
          self.run_command(cmd_name)
        File "/home/jwright/venvs/cq-test/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/jwright/venvs/cq-test/lib/python3.11/site-packages/setuptools/dist.py", line 1213, in run_command
          super().run_command(command)
        File "/home/jwright/venvs/cq-test/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-install-zlfqxldu/nlopt_6df9132acef84f0d8e1a2ec5c47c2a4e/setup.py", line 28, in run
          self.build_extension(ext)
        File "/tmp/pip-install-zlfqxldu/nlopt_6df9132acef84f0d8e1a2ec5c47c2a4e/setup.py", line 70, in build_extension
          nlopt_py = next(Path(self.build_temp).rglob("nlopt.py"))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      StopIteration
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> nlopt

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants