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

Build the module differently #10

Open
patricklodder opened this issue Aug 18, 2022 · 3 comments
Open

Build the module differently #10

patricklodder opened this issue Aug 18, 2022 · 3 comments

Comments

@patricklodder
Copy link
Member

Originally posted by @xanimo in #9 (review)

Also a small nit that can be addressed in the future is to address the deprecation warnings regarding setup.py install as shown here:

$ CC=clang python setup.py install --user
running install
/home/bluezr/.local/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/home/bluezr/.local/lib/python3.10/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(
/home/bluezr/.local/lib/python3.10/site-packages/pkg_resources/__init__.py:123: PkgResourcesDeprecationWarning: 0.1.43ubuntu1 is an invalid version and will not be supported in a future release
  warnings.warn(
/home/bluezr/.local/lib/python3.10/site-packages/pkg_resources/__init__.py:123: PkgResourcesDeprecationWarning: 1.1build1 is an invalid version and will not be supported in a future release
...

This can be resolved by running python -m pip install .:

bluezr@x:/source/repos/ltc-scrypt$ CC=clang python -m pip install .
Defaulting to user installation because normal site-packages is not writeable
Processing /source/repos/ltc-scrypt
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: ltc-scrypt
  Building wheel for ltc-scrypt (setup.py) ... done
  Created wheel for ltc-scrypt: filename=ltc_scrypt-1.0-cp310-cp310-linux_x86_64.whl size=36781 sha256=0bceca8e9adbf6d2df42c6d9ac0e48a14036b00f1c5d6a61a9df77345dae241d
  Stored in directory: /home/bluezr/.cache/pip/wheels/ef/29/20/2b1706323ba8e21079924937b665d6b9c847ee8e478587a526
Successfully built ltc-scrypt
Installing collected packages: ltc-scrypt
  Attempting uninstall: ltc-scrypt
    Found existing installation: ltc-scrypt 1.0
    Uninstalling ltc-scrypt-1.0:
      Successfully uninstalled ltc-scrypt-1.0
Successfully installed ltc-scrypt-1.0
bluezr@x:/source/repos/ltc-scrypt$ CC=clang python test.py
test successful.
@patricklodder
Copy link
Member Author

The only question mark I have with this is:

Defaulting to user installation because normal site-packages is not writeable

can we make that explicit in the same way as we're calling setup.py --user?

@wakiyamap
Copy link

Now I think it's better to use setuptools instead of distutils.core.

from distutils.core import setup, Extension

from setuptools import setup, Extension

@patricklodder
Copy link
Member Author

Now I think it's better to use setuptools instead of distutils.core.

Thanks! This is do-able once we no longer need to support python 3.6 - currently we depend on that with Dogecoin Core because we cannot build 1.14 on anything higher than bionic. Once we've solved that problem there, we can move this to setuptools and save ourselves the dependency.

In the interim we could do something like this: patricklodder@0010943

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

No branches or pull requests

2 participants