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

Deprecation warning in build process #182

Closed
jzwar opened this issue Jun 28, 2023 · 7 comments · Fixed by #290
Closed

Deprecation warning in build process #182

jzwar opened this issue Jun 28, 2023 · 7 comments · Fixed by #290
Assignees
Labels
bug Something isn't working

Comments

@jzwar
Copy link
Collaborator

jzwar commented Jun 28, 2023

Running the build on splinepy prints the following warning (Ubuntu, python 3.9)

<path>/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
<path>/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.

Is this an issue with my installation or a common problem?

@jzwar jzwar added the bug Something isn't working label Jun 28, 2023
@clemens-fricke
Copy link
Member

clemens-fricke commented Sep 26, 2023

Sorry for the late answer. Calling setup.py is being deprecated apparently. Just yesterday I found a workaround for the "--minimal" option that needs to be added during most installs.

After a quick look around I found this blog post:
https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html#summary
It would be great if @j042 @jzwar could also look into it so that we can together decide if this is something we need to update or if we can live with the current -- now apparently deprecated -- workflow.

@clemens-fricke
Copy link
Member

From what I read we can just go to pip install . or pip install -e .. If the --minimal option is needed the following can be appended --install-option="--minimal".

For package build there seems to be a build package which can also use the configurations in existing setup.py files. (Hopefully just drop-in replacement)

But as I understand it, it might be better to move towards a pyproject.toml approach (the primary way to use the build package) in the future.

@clemens-fricke
Copy link
Member

Ok after, (somehow) my pip updated, the previous --install-option is no longer available for the pip install command. But now you can do --config-setting="--build-option=--minimal".

I am not sure why they are abstracting it further and further.

@j042
Copy link
Member

j042 commented Oct 2, 2023

Maybe it is time to move to skbuild

@FSchwar
Copy link
Contributor

FSchwar commented Nov 6, 2023

I am also getting an error when trying to build splinepy (WSL, Ubuntu, python 3.9).
Tried the following command:

python setup.py develop --config-setting="--build-option=--minimal"

and got following error:

************* build options ************
{
  cmake_args: {
    --verbose_make: -DSPLINEPY_VERBOSE_MAKE=OFF
    --minimal: -DSPLINEPY_MORE=ON
    --enable_warning: -DSPLINEPY_ENABLE_WARNINGS=OFF
    --no_explicit: -DSPLINEPY_BUILD_EXPLICIT=ON
  }
  build_args: {
    --serial_build: -j 12
  }
  --debug : False
}
****************************************
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: option --config-setting not recognized

Also tried:
python setup.py develop --install-option="--minimal"
but got the same type of errors (option ... not recognized)

and with:
python setup.py develop --minimal --enable_warning

i got:

************* build options ************
{
  cmake_args: {
    --verbose_make: -DSPLINEPY_VERBOSE_MAKE=OFF
    --minimal: -DSPLINEPY_MORE=OFF
    --enable_warning: -DSPLINEPY_ENABLE_WARNINGS=ON
    --no_explicit: -DSPLINEPY_BUILD_EXPLICIT=ON
  }
  build_args: {
    --serial_build: -j 12
  }
  --debug : False
}
****************************************
running develop
/home/fschwar/miniconda3/envs/p39/lib/python3.9/site-packages/setuptools/command/develop.py:40: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` and ``easy_install``.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://github.com/pypa/setuptools/issues/917 for details.
        ********************************************************************************

!!
  easy_install.initialize_options(self)
/home/fschwar/miniconda3/envs/p39/lib/python3.9/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
running egg_info
error: Cannot update time stamp of directory 'splinepy.egg-info'

Do you have any further ideas?

@j042
Copy link
Member

j042 commented Nov 6, 2023

Do you have any further ideas?

I am working on updated build now, PR should be ready some time soon.
python setup.py develop --minimal should still work. Have you tried deleting all the previous build artifacts?

@FSchwar
Copy link
Contributor

FSchwar commented Nov 6, 2023

Hm, I´m getting the warnings/error like mentioned above in the last section.
But i didn't try to delete anything prior to building it - how would I delete those artifacts?

@j042 j042 mentioned this issue Nov 7, 2023
3 tasks
@j042 j042 closed this as completed in #290 Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants