diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-04-11 07:05:09 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-04-11 07:05:09 +0000 |
| commit | df2d113453fd826a615f5ff16e2b47be23507a3f (patch) | |
| tree | 56941fc7856a3afcca1482a36f6d8c5f0e07c130 /python-screeninfo.spec | |
| parent | 5b51bd60367deacd0e6b73a2af85f45998130bf9 (diff) | |
automatic import of python-screeninfo
Diffstat (limited to 'python-screeninfo.spec')
| -rw-r--r-- | python-screeninfo.spec | 207 |
1 files changed, 207 insertions, 0 deletions
diff --git a/python-screeninfo.spec b/python-screeninfo.spec new file mode 100644 index 0000000..1fce4ce --- /dev/null +++ b/python-screeninfo.spec @@ -0,0 +1,207 @@ +%global _empty_manifest_terminate_build 0 +Name: python-screeninfo +Version: 0.8.1 +Release: 1 +Summary: Fetch location and size of physical screens. +License: MIT +URL: https://github.com/rr-/screeninfo +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/ec/bb/e69e5e628d43f118e0af4fc063c20058faa8635c95a1296764acc8167e27/screeninfo-0.8.1.tar.gz +BuildArch: noarch + +Requires: python3-dataclasses +Requires: python3-Cython +Requires: python3-pyobjc-framework-Cocoa + +%description +[](https://github.com/rr-/screeninfo/actions/workflows/build.yml) +Fetch location and size of physical screens. +### Supported environments +- MS Windows +- MS Windows: Cygwin +- GNU/Linux: X11 (through Xinerama) +- GNU/Linux: DRM (experimental) +- OSX: (through AppKit) +I don't plan on testing OSX or other environments myself. For this reason, +I strongly encourage pull requests. +### Installation +``` +pip install screeninfo +``` +### Usage +```python +from screeninfo import get_monitors +for m in get_monitors(): + print(str(m)) +``` +**Output**: +```python console +Monitor(x=3840, y=0, width=3840, height=2160, width_mm=1420, height_mm=800, name='HDMI-0', is_primary=False) +Monitor(x=0, y=0, width=3840, height=2160, width_mm=708, height_mm=399, name='DP-0', is_primary=True) +``` +### Forcing environment +In some cases (emulating X server on Cygwin etc.) you might want to specify the +driver directly. You can do so by passing extra parameter to `get_monitors()` +like this: +```python +from screeninfo import get_monitors, Enumerator +for m in get_monitors(Enumerator.OSX): + print(str(m)) +``` +Available drivers: `windows`, `cygwin`, `x11`, `osx`. +# Contributing +```sh +git clone https://github.com/rr-/screeninfo.git # clone this repo +cd screeninfo +poetry install # to install the local venv +poetry run pre-commit install # to setup pre-commit hooks +poetry shell # to enter the venv +``` +This project uses [poetry](https://python-poetry.org/) for packaging, +install instructions at [poetry#installation](https://python-poetry.org/docs/#installation) + +%package -n python3-screeninfo +Summary: Fetch location and size of physical screens. +Provides: python-screeninfo +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-screeninfo +[](https://github.com/rr-/screeninfo/actions/workflows/build.yml) +Fetch location and size of physical screens. +### Supported environments +- MS Windows +- MS Windows: Cygwin +- GNU/Linux: X11 (through Xinerama) +- GNU/Linux: DRM (experimental) +- OSX: (through AppKit) +I don't plan on testing OSX or other environments myself. For this reason, +I strongly encourage pull requests. +### Installation +``` +pip install screeninfo +``` +### Usage +```python +from screeninfo import get_monitors +for m in get_monitors(): + print(str(m)) +``` +**Output**: +```python console +Monitor(x=3840, y=0, width=3840, height=2160, width_mm=1420, height_mm=800, name='HDMI-0', is_primary=False) +Monitor(x=0, y=0, width=3840, height=2160, width_mm=708, height_mm=399, name='DP-0', is_primary=True) +``` +### Forcing environment +In some cases (emulating X server on Cygwin etc.) you might want to specify the +driver directly. You can do so by passing extra parameter to `get_monitors()` +like this: +```python +from screeninfo import get_monitors, Enumerator +for m in get_monitors(Enumerator.OSX): + print(str(m)) +``` +Available drivers: `windows`, `cygwin`, `x11`, `osx`. +# Contributing +```sh +git clone https://github.com/rr-/screeninfo.git # clone this repo +cd screeninfo +poetry install # to install the local venv +poetry run pre-commit install # to setup pre-commit hooks +poetry shell # to enter the venv +``` +This project uses [poetry](https://python-poetry.org/) for packaging, +install instructions at [poetry#installation](https://python-poetry.org/docs/#installation) + +%package help +Summary: Development documents and examples for screeninfo +Provides: python3-screeninfo-doc +%description help +[](https://github.com/rr-/screeninfo/actions/workflows/build.yml) +Fetch location and size of physical screens. +### Supported environments +- MS Windows +- MS Windows: Cygwin +- GNU/Linux: X11 (through Xinerama) +- GNU/Linux: DRM (experimental) +- OSX: (through AppKit) +I don't plan on testing OSX or other environments myself. For this reason, +I strongly encourage pull requests. +### Installation +``` +pip install screeninfo +``` +### Usage +```python +from screeninfo import get_monitors +for m in get_monitors(): + print(str(m)) +``` +**Output**: +```python console +Monitor(x=3840, y=0, width=3840, height=2160, width_mm=1420, height_mm=800, name='HDMI-0', is_primary=False) +Monitor(x=0, y=0, width=3840, height=2160, width_mm=708, height_mm=399, name='DP-0', is_primary=True) +``` +### Forcing environment +In some cases (emulating X server on Cygwin etc.) you might want to specify the +driver directly. You can do so by passing extra parameter to `get_monitors()` +like this: +```python +from screeninfo import get_monitors, Enumerator +for m in get_monitors(Enumerator.OSX): + print(str(m)) +``` +Available drivers: `windows`, `cygwin`, `x11`, `osx`. +# Contributing +```sh +git clone https://github.com/rr-/screeninfo.git # clone this repo +cd screeninfo +poetry install # to install the local venv +poetry run pre-commit install # to setup pre-commit hooks +poetry shell # to enter the venv +``` +This project uses [poetry](https://python-poetry.org/) for packaging, +install instructions at [poetry#installation](https://python-poetry.org/docs/#installation) + +%prep +%autosetup -n screeninfo-0.8.1 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-screeninfo -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 0.8.1-1 +- Package Spec generated |
