Skip to content

gpgme 1.17.0 #94966

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

Closed
wants to merge 3 commits into from
Closed

gpgme 1.17.0 #94966

wants to merge 3 commits into from

Conversation

chenrui333
Copy link
Member

Created with brew bump-formula-pr.

@BrewTestBot BrewTestBot added the bump-formula-pr PR was created using `brew bump-formula-pr` label Feb 12, 2022
It's no longer needed.
@carlocab carlocab added the help wanted Task(s) needing PRs from the community or maintainers label Feb 12, 2022
@cho-m
Copy link
Member

cho-m commented Feb 17, 2022

Something is going wrong with our [email protected]. If I try downgrading dependency to [email protected], it installs correctly.

Possibly related failure message:

running install
/usr/local/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/usr/local/lib/python3.9/site-packages/setuptools/command/easy_install.py:156: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/usr/local/opt/[email protected]/bin/python3.9 -E -c pass
TEST FAILED: /usr/local/Cellar/gpgme/1.17.0/lib/python3.9/site-packages/ does NOT support .pth files
bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from.  The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /usr/local/Cellar/gpgme/1.17.0/lib/python3.9/site-packages/

and your PYTHONPATH environment variable currently contains:

    ''

Here are some of your options for correcting the problem:

* You can choose a different installation directory, i.e., one that is
  on PYTHONPATH or supports .pth files

* You can add the installation directory to the PYTHONPATH environment
  variable.  (It must then also be on PYTHONPATH whenever you run
  Python and want to use the package(s) you are installing.)

* You can set up the installation directory to support ".pth" files by
  using one of the approaches described here:

  https://setuptools.pypa.io/en/latest/deprecated/easy_install.html#custom-installation-locations

After which, the install puts files inside:
/usr/local/Cellar/gpgme/1.17.0/lib/python3.9/site-packages/gpg-1.17.0-py3.9-macosx-12-x86_64.egg/gpg
Rather than
/usr/local/Cellar/gpgme/1.17.0/lib/python3.9/site-packages/gpg

def install
ENV["PYTHON"] = Formula["[email protected]"].opt_bin/"python3"
ENV["SETUPTOOLS_USE_DISTUTILS"] = "stdlib"
Copy link
Member

@cho-m cho-m Feb 18, 2022

Choose a reason for hiding this comment

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

Do-not-merge for now since this may be better to handle inside [email protected]/[email protected] formulae.

Upstream setuptools >= 60 change: pypa/setuptools#2896


It looks like there was some discussion in relation to Homebrew, so there may already be a fix/workaround in place.

Need someone familiar with current status to provide guidance on proper solution.

Copy link
Member

Choose a reason for hiding this comment

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

This is the workaround used in other formulae, so I'm fine with this. We should add a comment documenting this, though.

I also wonder if these patches should be handling this:

# Modify default sysconfig to match the brew install layout.
# Remove when a non-patching mechanism is added (https://bugs.python.org/issue43976).
# We (ab)use osx_framework_library to exploit pip behaviour to allow --prefix to still work.
patch do
url "https://raw.githubusercontent.com/Homebrew/formula-patches/a1618a5005d0b01d63b720321806820a03432f1a/python/3.10-sysconfig.diff"
sha256 "51bc741a7f201bf7382067f5561a10968476c98d952e54a4f1931f17f1397ef8"
end
# Make bundled distutils look at preferred sysconfig scheme.
# Remove with Python 3.12.
patch do
url "https://raw.githubusercontent.com/Homebrew/formula-patches/a1618a5005d0b01d63b720321806820a03432f1a/python/3.10-distutils-scheme.diff"
sha256 "d1a29b3c9ecf8aecd65e1e54efc42fb1422b2f5d05cba0c747178f4ef8a69683"
end

CC @Bo98

Copy link
Member

Choose a reason for hiding this comment

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

We can add a comment like git-cola with possible fix if distutils is no longer needed with https://dev.gnupg.org/D545

@cho-m cho-m force-pushed the bump-gpgme-1.17.0 branch from 2355227 to 561aae0 Compare February 18, 2022 02:46
@cho-m cho-m removed help wanted Task(s) needing PRs from the community or maintainers do not merge labels Feb 18, 2022
@BrewTestBot
Copy link
Member

🤖 A scheduled task has triggered a merge.

@github-actions github-actions bot added the outdated PR was locked due to age label Mar 21, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2022
@chenrui333 chenrui333 deleted the bump-gpgme-1.17.0 branch December 18, 2022 06:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bump-formula-pr PR was created using `brew bump-formula-pr` outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants