Commit Graph

16 Commits

Author SHA1 Message Date
Xuan Wang bb3edd22b3 [Python Modernization] Deprecate pkg_resources (#35849)
Discuss thread about this change: [link](https://mail.google.com/mail/u/0/#sent/QgrcJHsBpWNGRlrMktwbppGGfFTVCFLcQgL?compose=new)
<!--

If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the appropriate
lang label.

-->

Closes #35849

PiperOrigin-RevId: 607144827
2024-02-14 16:44:42 -08:00
Xuan Wang c7a1336566
[Python 3.12] Deprecate distutil (#34186)
### Background

* `distutils` is deprecated with removal planned for Python 3.12
([pep-0632](https://peps.python.org/pep-0632/)), thus we're trying to
replace all distutils usage with setuptools.
* Please note that user still have access to `distutils` if setuptools
is installed and `SETUPTOOLS_USE_DISTUTILS` is set to `local` (The
default in setuptools, more details can be found [in this
discussion](https://github.com/pypa/setuptools/issues/2806#issuecomment-1193336591)).

### How we decide the replacement

* We're following setuptools [Porting from Distutils
guide](https://setuptools.pypa.io/en/latest/deprecated/distutils-legacy.html#porting-from-distutils)
when deciding the replacement.

#### Replacement not mentioned in the guide

* Replaced `distutils.utils.get_platform()` with
`sysconfig.get_platform()`.
* Based on the [answer
here](https://stackoverflow.com/questions/71664875/what-is-the-replacement-for-distutils-util-get-platform),
and also checked the document that `sysconfig.get_platform()` is good
enough for our use cases.
* Replaced `DistutilsOptionError` with `OptionError`.
* `setuptools.error` is exporting it as `OptionError` [in the
code](https://github.com/pypa/setuptools/blob/v59.6.0/setuptools/errors.py).
* Upgrade `setuptools` in `test_packages.sh` and changed the version
ping to `59.6.0` in `build_artifact_python.bat`.
* `distutils.errors.*` is not fully re-exported until `59.0.0` (See
[this issue](https://github.com/pypa/setuptools/issues/2698) for more
details).

### Changes not included in this PR

* We're patching some compiler related functions provided by distutils
in our code
([example](ee4efc31c1/src/python/grpcio/_spawn_patch.py (L30))),
but since `setuptools` doesn't have similar interface (See [this issue
for more details](https://github.com/pypa/setuptools/issues/2806)), we
don't have a clear path to replace them yet.


<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-09-06 14:32:30 -07:00
Lidi Zheng cd4261b946
Support musllinux binary wheels on x64 and x86 (#28092)
* Support musllinux binary wheels

* Skip aarach64 for now
* Consolidate the difference of mktemp
* Extend linux artifact building time && install bash for distribtest
* Stop using grpc.tools, use grpc_tools
* Update the README to use grpc_tools
* Force static link libc++ for alpine binaries
* Rebase recent build script changes

* Install ccache for musllinux distribtest images

* Revert timeout change to grpc_build_artifacts
2022-02-10 14:14:56 -08:00
Lidi Zheng 4729f6fdcc
Add Python 3.10 drop 3.5 (#26074)
* Add Python 3.10.0rc1 binary wheels

* Drop Python 3.5 artifacts

* Document the drop of 3.5

* Fix the wrong pip pointer

* Update manylinux2014 to a newer version, remove 3.5 distribtest

* Update manylinux aarch64 to see if the absl error go away

* Use the preferred alias

* Allow different wheel library to produce different tag order

* Remove unused shell var and log produced wheels

* Use copy instead of move

* Make bash happy about the wildcard

* Upgrade the debian image to use 3.5+ Python

* Polish the comments for the Dockerfiles
2021-09-02 14:02:53 -07:00
Jan Tattermusch 21512217f2 get rid of the https://grpc.io/release plague 2020-02-04 15:01:03 +01:00
Richard Belleville 0ebeb40718
Merge pull request #19084 from gnossen/python2-deprecation-notice
Add python deprecation notices.
2019-05-28 13:06:52 -07:00
Srini Polavarapu ec640a53c6 Merge pull request #19105 from gnossen/twine_check_artifacts
Produce Python Wheels with a Valid long_description field
2019-05-28 10:11:34 -07:00
Richard Belleville cb9e2188ab Add python deprecation notices. 2019-05-20 13:05:37 -07:00
Feng Li d1ffa617f9
Update README.rst for python grpcio-tools
GRPC_PYTHON_BUILD_WITH_CYTHON=1 is required to build grpcio-tools from source.
2018-01-26 11:55:14 -08:00
Mehrdad Afshari 976eb7c4b4 Fetch grpc.io/release over https 2017-07-10 15:07:33 -07:00
Masood Malekghassemi 34c9a73ab9 Document the custom grpcio-tools command class 2016-07-19 14:32:42 -07:00
Masood Malekghassemi 165f9a713b Restructure reStructured text to be valid 2016-07-12 16:18:59 -07:00
David Garcia Quintas 4281272389 Updated git clone URL 2016-06-29 17:39:07 -07:00
Masood Malekghassemi 82c3dd1f0a Add usage documentation to Python tools distribution 2016-06-08 17:55:25 -07:00
Masood Malekghassemi b4e82f7897 Fix windows linkage in Python grpcio-tools 2016-05-07 13:01:14 -07:00
Masood Malekghassemi 7e660d7e42 Add Python grpcio-tools documentation 2016-05-05 20:11:50 -07:00