xcffib
Advanced tools
| [build-system] | ||
| requires = ["setuptools>=61.0"] | ||
| build-backend = "setuptools.build_meta" | ||
| [project] | ||
| name = "xcffib" | ||
| version = "1.10.0" | ||
| description = "xcffib is the XCB binding for python" | ||
| readme = "README.md" | ||
| keywords = ["xcb", "cffi", "x11", "x", "windows"] | ||
| license = {text = "Apache License 2.0"} | ||
| authors = [ | ||
| {name = "Tycho Andersen", email = "tycho@tycho.pizza"}, | ||
| ] | ||
| classifiers = [ | ||
| "Development Status :: 5 - Production/Stable", | ||
| "License :: OSI Approved :: Apache Software License", | ||
| "Programming Language :: Python :: 3", | ||
| "Programming Language :: Python :: Implementation :: CPython", | ||
| "Programming Language :: Python :: Implementation :: PyPy", | ||
| "Topic :: Software Development :: Libraries", | ||
| ] | ||
| dependencies = [ | ||
| "cffi>=1.1.0; python_implementation != 'PyPy'", | ||
| ] | ||
| requires-python = ">=3.10" | ||
| [project.urls] | ||
| Homepage = "http://github.com/tych0/xcffib" | ||
| [tool.setuptools.packages.find] | ||
| where = ["."] | ||
| include = ["xcffib*"] | ||
| [tool.setuptools.package-data] | ||
| xcffib = ["py.typed"] | ||
| [project.optional-dependencies] | ||
| dev = [ | ||
| "pytest>=8.4", | ||
| ] |
+60
-6
@@ -1,10 +0,9 @@ | ||
| Metadata-Version: 2.1 | ||
| Metadata-Version: 2.4 | ||
| Name: xcffib | ||
| Version: 1.9.0 | ||
| Version: 1.10.0 | ||
| Summary: xcffib is the XCB binding for python | ||
| Home-page: http://github.com/tych0/xcffib | ||
| Author: Tycho Andersen | ||
| Author-email: tycho@tycho.pizza | ||
| Author-email: Tycho Andersen <tycho@tycho.pizza> | ||
| License: Apache License 2.0 | ||
| Keywords: xcb cffi x11 x windows | ||
| Project-URL: Homepage, http://github.com/tych0/xcffib | ||
| Keywords: xcb,cffi,x11,x,windows | ||
| Classifier: Development Status :: 5 - Production/Stable | ||
@@ -17,3 +16,58 @@ Classifier: License :: OSI Approved :: Apache Software License | ||
| Requires-Python: >=3.10 | ||
| Description-Content-Type: text/markdown | ||
| License-File: LICENSE | ||
| Requires-Dist: cffi>=1.1.0; platform_python_implementation != "PyPy" | ||
| Provides-Extra: dev | ||
| Requires-Dist: pytest>=8.4; extra == "dev" | ||
| Dynamic: license-file | ||
| # xcffib [](https://github.com/tych0/xcffib/actions) | ||
| `xcffib` is the XCB binding for Python. | ||
| ## Installation | ||
| For most end users of software that depends on xcffib or developers writing | ||
| code against xcffib, you can use the version of xcffib on pypi. To install it, | ||
| you'll need libxcb's headers and libxcb-render's headers (these are available | ||
| via `sudo apt-get install libxcb-render0-dev` on Ubuntu). Once you have the C | ||
| headers installed, you can just `pip install xcffib`. | ||
| If you're interested in doing development, read on... | ||
| ## Development dependencies | ||
| You should be able to install all the language deps from hackage or pip. | ||
| [.github/workflows/ci.yaml](https://github.com/tych0/xcffib/blob/master/.github/workflows/ci.yaml) | ||
| has an example of how to install the dependencies on Ubuntu flavors. | ||
| ## Hacking | ||
| See the [Makefile](https://github.com/tych0/xcffib/blob/master/Makefile) for | ||
| examples on how to run the tests. Your contribution should at pass `make check` | ||
| before it can be merged. The `newtests` make target can be used to regenerate | ||
| expected haskell test data if the tests are failing because you made a change | ||
| to the generated python code. | ||
| ### Hacking on new xcbproto versions | ||
| Sometimes (more often recently), xcbproto makes some updates that we need to | ||
| do some work for. These often require some updates to `xcb-types` as well. | ||
| First, hack your changes into `xcb-types` and `cabal install` them, then git | ||
| clone the version of xcbproto you want to somewhere, e.g. `~/packages`: | ||
| ~/packages $ git clone https://gitlab.freedesktop.org/xorg/proto/xcbproto.git | ||
| Finally, you can build/test xcffib against this custom version of | ||
| `xcb-{proto|types}` with: | ||
| make XCBDIR=~/packages/xcbproto/src check | ||
| ### Hacking on new xcb-types versions | ||
| To go along with new xcbproto elements, sometimes you need to hack on newer | ||
| versions of xcb-types. Newer cabals require you to do something like: | ||
| echo packages: ../xcb-types/xcb-types.cabal ./xcffib.cabal > cabal.project | ||
| In order to find locally modified versions of xcb-types. |
@@ -1,10 +0,9 @@ | ||
| Metadata-Version: 2.1 | ||
| Metadata-Version: 2.4 | ||
| Name: xcffib | ||
| Version: 1.9.0 | ||
| Version: 1.10.0 | ||
| Summary: xcffib is the XCB binding for python | ||
| Home-page: http://github.com/tych0/xcffib | ||
| Author: Tycho Andersen | ||
| Author-email: tycho@tycho.pizza | ||
| Author-email: Tycho Andersen <tycho@tycho.pizza> | ||
| License: Apache License 2.0 | ||
| Keywords: xcb cffi x11 x windows | ||
| Project-URL: Homepage, http://github.com/tych0/xcffib | ||
| Keywords: xcb,cffi,x11,x,windows | ||
| Classifier: Development Status :: 5 - Production/Stable | ||
@@ -17,3 +16,58 @@ Classifier: License :: OSI Approved :: Apache Software License | ||
| Requires-Python: >=3.10 | ||
| Description-Content-Type: text/markdown | ||
| License-File: LICENSE | ||
| Requires-Dist: cffi>=1.1.0; platform_python_implementation != "PyPy" | ||
| Provides-Extra: dev | ||
| Requires-Dist: pytest>=8.4; extra == "dev" | ||
| Dynamic: license-file | ||
| # xcffib [](https://github.com/tych0/xcffib/actions) | ||
| `xcffib` is the XCB binding for Python. | ||
| ## Installation | ||
| For most end users of software that depends on xcffib or developers writing | ||
| code against xcffib, you can use the version of xcffib on pypi. To install it, | ||
| you'll need libxcb's headers and libxcb-render's headers (these are available | ||
| via `sudo apt-get install libxcb-render0-dev` on Ubuntu). Once you have the C | ||
| headers installed, you can just `pip install xcffib`. | ||
| If you're interested in doing development, read on... | ||
| ## Development dependencies | ||
| You should be able to install all the language deps from hackage or pip. | ||
| [.github/workflows/ci.yaml](https://github.com/tych0/xcffib/blob/master/.github/workflows/ci.yaml) | ||
| has an example of how to install the dependencies on Ubuntu flavors. | ||
| ## Hacking | ||
| See the [Makefile](https://github.com/tych0/xcffib/blob/master/Makefile) for | ||
| examples on how to run the tests. Your contribution should at pass `make check` | ||
| before it can be merged. The `newtests` make target can be used to regenerate | ||
| expected haskell test data if the tests are failing because you made a change | ||
| to the generated python code. | ||
| ### Hacking on new xcbproto versions | ||
| Sometimes (more often recently), xcbproto makes some updates that we need to | ||
| do some work for. These often require some updates to `xcb-types` as well. | ||
| First, hack your changes into `xcb-types` and `cabal install` them, then git | ||
| clone the version of xcbproto you want to somewhere, e.g. `~/packages`: | ||
| ~/packages $ git clone https://gitlab.freedesktop.org/xorg/proto/xcbproto.git | ||
| Finally, you can build/test xcffib against this custom version of | ||
| `xcb-{proto|types}` with: | ||
| make XCBDIR=~/packages/xcbproto/src check | ||
| ### Hacking on new xcb-types versions | ||
| To go along with new xcbproto elements, sometimes you need to hack on newer | ||
| versions of xcb-types. Newer cabals require you to do something like: | ||
| echo packages: ../xcb-types/xcb-types.cabal ./xcffib.cabal > cabal.project | ||
| In order to find locally modified versions of xcb-types. |
| [:platform_python_implementation != "PyPy"] | ||
| cffi>=1.1.0 | ||
| [dev] | ||
| pytest>=8.4 |
| LICENSE | ||
| MANIFEST.in | ||
| README.md | ||
| setup.py | ||
| pyproject.toml | ||
| test/__init__.py | ||
@@ -53,4 +53,3 @@ test/conftest.py | ||
| xcffib.egg-info/dependency_links.txt | ||
| xcffib.egg-info/not-zip-safe | ||
| xcffib.egg-info/requires.txt | ||
| xcffib.egg-info/top_level.txt |
@@ -37,4 +37,8 @@ # Copyright 2014 Tycho Andersen | ||
| # Add this for portable access to C's free() | ||
| c_lib = ffi.dlopen(None) # Loads the global symbol table (works on Unix/BSD) | ||
| c_free = c_lib.free | ||
| __xcb_proto_version__ = "1.17.0" | ||
| __version__ = "1.9.0" | ||
| __version__ = "1.10.0" | ||
@@ -642,3 +646,3 @@ X_PROTOCOL = lib.X_PROTOCOL | ||
| e = lib.xcb_wait_for_event(self._conn) | ||
| e = ffi.gc(e, lib.free) | ||
| e = ffi.gc(e, c_free) | ||
| self.invalid() | ||
@@ -695,3 +699,3 @@ return self.hoist_event(e) | ||
| data = lib.xcb_wait_for_reply(self._conn, sequence, error_p) | ||
| data = ffi.gc(data, lib.free) | ||
| data = ffi.gc(data, c_free) | ||
@@ -702,3 +706,3 @@ try: | ||
| if error_p[0] != ffi.NULL: | ||
| lib.free(error_p[0]) | ||
| c_free(error_p[0]) | ||
@@ -705,0 +709,0 @@ if data == ffi.NULL: |
-74
| #!/usr/bin/env python | ||
| # | ||
| # Copyright 2014 Tycho Andersen | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| import os | ||
| import sys | ||
| from setuptools import setup | ||
| from setuptools.command.install import install | ||
| from distutils.command.build import build | ||
| class binding_build(build): | ||
| """This is a check to ensure that the bindings have been generated, and | ||
| print a helpful message if they have not been generated yet. We only need | ||
| to check this when we are actually building or installing. | ||
| """ | ||
| def finalize_options(self): | ||
| if not os.path.exists("./xcffib"): | ||
| print("It looks like you need to generate the binding.") | ||
| print("please run 'make xcffib' or 'make check'.") | ||
| sys.exit(1) | ||
| build.finalize_options(self) | ||
| class binding_install(install): | ||
| def finalize_options(self): | ||
| if not os.path.exists("./xcffib"): | ||
| print("It looks like you need to generate the binding.") | ||
| print("please run 'make xcffib' or 'make check'.") | ||
| sys.exit(1) | ||
| install.finalize_options(self) | ||
| version = "1.9.0" | ||
| dependencies = ["cffi>=1.1.0; python_implementation != 'PyPy'"] | ||
| setup( | ||
| name="xcffib", | ||
| version=version, | ||
| description="xcffib is the XCB binding for python", | ||
| keywords="xcb cffi x11 x windows", | ||
| license="Apache License 2.0", | ||
| url="http://github.com/tych0/xcffib", | ||
| author="Tycho Andersen", | ||
| author_email="tycho@tycho.pizza", | ||
| install_requires=dependencies, | ||
| setup_requires=dependencies, | ||
| python_requires=">=3.10", | ||
| packages=["xcffib"], | ||
| package_data={"xcffib": ["py.typed"]}, | ||
| zip_safe=False, | ||
| cmdclass={"build": binding_build, "install": binding_install}, | ||
| classifiers=[ | ||
| "Development Status :: 5 - Production/Stable", | ||
| "License :: OSI Approved :: Apache Software License", | ||
| "Programming Language :: Python :: 3", | ||
| "Programming Language :: Python :: Implementation :: CPython", | ||
| "Programming Language :: Python :: Implementation :: PyPy", | ||
| "Topic :: Software Development :: Libraries", | ||
| ], | ||
| ) |
Sorry, the diff of this file is not supported yet
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
1054346
0.3%56
-1.75%29297
-0.21%