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

The license_file parameter is deprecated #714

Closed
hubutui opened this issue Jul 31, 2023 · 3 comments · Fixed by #715
Closed

The license_file parameter is deprecated #714

hubutui opened this issue Jul 31, 2023 · 3 comments · Fixed by #715

Comments

@hubutui
Copy link
Contributor

hubutui commented Jul 31, 2023

/usr/lib/python3.11/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
!!

        ********************************************************************************
        The license_file parameter is deprecated, use license_files instead.

        By 2023-Oct-30, you need to update your project and remove deprecated calls
        or your builds will no longer be supported.

        See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
        ********************************************************************************

!!

Just update

license_file = LICENSE

to

license_files = LICENSE
@lanpa
Copy link
Owner

lanpa commented Jul 31, 2023

Hi, would you like to send a pull request?

hubutui added a commit to hubutui/tensorboardX that referenced this issue Jul 31, 2023
Signed-off-by: Butui Hu <hot123tea123@gmail.com>
@hubutui
Copy link
Contributor Author

hubutui commented Jul 31, 2023

BTW, why do you use pip install in the setup.py?

tensorboardX/setup.py

Lines 20 to 25 in 79a1758

class PostInstallCommand(install):
"""Post-installation for installation mode."""
def run(self):
for r in requirements:
subprocess.run(f"pip install '{r}'", shell=True)
install.run(self)

We usually declare the requirements in install_requires and it's enough. This led to an error when I build the wheel file for ArchLinux with python -m build --wheel --no-isolation.

installing to build/bdist.linux-x86_64/wheel
running install
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try 'pacman -S
    python-xyz', where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Arch-packaged Python package,
    create a virtual environment using 'python -m venv path/to/venv'.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip.
    
    If you wish to install a non-Arch packaged Python application,
    it may be easiest to use 'pipx install xyz', which will manage a
    virtual environment for you. Make sure you have python-pipx
    installed via pacman.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

@lanpa lanpa closed this as completed in #715 Aug 6, 2023
lanpa pushed a commit that referenced this issue Aug 6, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Signed-off-by: Butui Hu <hot123tea123@gmail.com>
@lanpa
Copy link
Owner

lanpa commented Aug 6, 2023

@hubutui As for the PostInstallCommand issue, if I remember correctly, this is needed if using python setup.py install. (Maybe 5 years ago?) Any PRs are welcome!

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 a pull request may close this issue.

2 participants