summaryrefslogtreecommitdiff
path: root/python-daktari.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-10 07:52:05 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-10 07:52:05 +0000
commit0c7fc2c813532d7a245e577a49533fb9e86b56fe (patch)
treed1759db7da2180adbc2a3fd7e44f4f89822afb4e /python-daktari.spec
parentc555108a56c7612abd4f28376c1c772283671c50 (diff)
automatic import of python-daktari
Diffstat (limited to 'python-daktari.spec')
-rw-r--r--python-daktari.spec324
1 files changed, 324 insertions, 0 deletions
diff --git a/python-daktari.spec b/python-daktari.spec
new file mode 100644
index 0000000..163934a
--- /dev/null
+++ b/python-daktari.spec
@@ -0,0 +1,324 @@
+%global _empty_manifest_terminate_build 0
+Name: python-daktari
+Version: 0.0.97
+Release: 1
+Summary: Assist in setting up and maintaining developer environments
+License: MIT
+URL: https://github.com/sonocent/daktari
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/00/ee/97bf18dd7b681ef84bb57964b8a77c5b64632e71732c97433c49181b9d8f/daktari-0.0.97.tar.gz
+BuildArch: noarch
+
+Requires: python3-PyYAML
+Requires: python3-ansicolors
+Requires: python3-distro
+Requires: python3-dpath
+Requires: python3-importlib-resources
+Requires: python3-packaging
+Requires: python3-pyOpenSSL
+Requires: python3-pyfiglet
+Requires: python3-hosts
+Requires: python3-requests-unixsocket
+Requires: python3-requests
+Requires: python3-semver
+Requires: python3-setuptools
+Requires: python3-tabulate
+Requires: python3-types-PyYAML
+Requires: python3-types-pyOpenSSL
+Requires: python3-types-tabulate
+Requires: python3-dataclasses
+Requires: python3-types-dataclasses
+Requires: python3-pyobjc-core
+Requires: python3-pyobjc-framework-Cocoa
+
+%description
+**Daktari** is a tool to help the initial setup and ongoing maintenance of developer environments. It runs a series of checks (for example, that required software is installed) and provides suggestions on how to fix the issue if the check fails.
+
+## Configuration
+
+In the root of the project repository, create a `.daktari.py` configuration file listing the checks you want run. For example,
+
+```python
+from daktari.checks.git import *
+
+version = "0.0.97"
+title = "My Project"
+
+checks = [
+ GitInstalled(),
+ GitLfsInstalled(),
+ GitLfsSetUpForUser(),
+ GitLfsFilesDownloaded(),
+ GitCryptInstalled(),
+]
+```
+
+Then run `daktari` to diagnose your environment:
+
+```
+$ daktari
+✅ [git.installed] Git is installed
+✅ [git.lfs.installed] Git LFS is installed
+✅ [git.lfs.setUpForUser] Git LFS is set up for the current user
+✅ [git.lfs.filesDownloaded] Git LFS files have been downloaded
+❌ [git.crypt.installed] git-crypt is not installed
+┌─💡 Suggestion ─────────┐
+│ brew install git-crypt │
+└────────────────────────┘
+```
+
+## Custom Check
+
+You can write a custom check as a Python class within `.daktari.py`, and include it in your list of checks. Example of a check implementation:
+
+```python
+class GitCryptInstalled(Check):
+ name = "git.crypt.installed"
+ depends_on = [GitInstalled]
+
+ suggestions = {
+ OS.OS_X: "<cmd>brew install git-crypt</cmd>",
+ OS.UBUNTU: "<cmd>sudo apt install git-crypt</cmd>",
+ OS.GENERIC: "Install git-crypt (https://www.agwa.name/projects/git-crypt/)",
+ }
+
+ def check(self):
+ return self.verify(can_run_command("git crypt version"), "git-crypt is <not/> installed")
+```
+
+## Testing Daktari changes locally
+
+Having cloned the repo into `~/daktari`, you can make use of PYTHONPATH to run daktari using your local changes.
+
+To do this, navigate into a directory that has a `.daktari.py` (e.g. another repository intending to use your change) and run:
+
+```bash
+PYTHONPATH=~/daktari python3 -m daktari --debug
+```
+
+## Release instructions
+
+Daktari is continuously deployed via a github action - see [release.yaml](.github/workflows/release.yaml).
+In case of a need to manually release, the steps are:
+
+```
+bumpversion --verbose patch
+python setup.py sdist bdist_wheel
+twine check dist/*
+twine upload dist/*
+```
+
+
+
+
+%package -n python3-daktari
+Summary: Assist in setting up and maintaining developer environments
+Provides: python-daktari
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-daktari
+**Daktari** is a tool to help the initial setup and ongoing maintenance of developer environments. It runs a series of checks (for example, that required software is installed) and provides suggestions on how to fix the issue if the check fails.
+
+## Configuration
+
+In the root of the project repository, create a `.daktari.py` configuration file listing the checks you want run. For example,
+
+```python
+from daktari.checks.git import *
+
+version = "0.0.97"
+title = "My Project"
+
+checks = [
+ GitInstalled(),
+ GitLfsInstalled(),
+ GitLfsSetUpForUser(),
+ GitLfsFilesDownloaded(),
+ GitCryptInstalled(),
+]
+```
+
+Then run `daktari` to diagnose your environment:
+
+```
+$ daktari
+✅ [git.installed] Git is installed
+✅ [git.lfs.installed] Git LFS is installed
+✅ [git.lfs.setUpForUser] Git LFS is set up for the current user
+✅ [git.lfs.filesDownloaded] Git LFS files have been downloaded
+❌ [git.crypt.installed] git-crypt is not installed
+┌─💡 Suggestion ─────────┐
+│ brew install git-crypt │
+└────────────────────────┘
+```
+
+## Custom Check
+
+You can write a custom check as a Python class within `.daktari.py`, and include it in your list of checks. Example of a check implementation:
+
+```python
+class GitCryptInstalled(Check):
+ name = "git.crypt.installed"
+ depends_on = [GitInstalled]
+
+ suggestions = {
+ OS.OS_X: "<cmd>brew install git-crypt</cmd>",
+ OS.UBUNTU: "<cmd>sudo apt install git-crypt</cmd>",
+ OS.GENERIC: "Install git-crypt (https://www.agwa.name/projects/git-crypt/)",
+ }
+
+ def check(self):
+ return self.verify(can_run_command("git crypt version"), "git-crypt is <not/> installed")
+```
+
+## Testing Daktari changes locally
+
+Having cloned the repo into `~/daktari`, you can make use of PYTHONPATH to run daktari using your local changes.
+
+To do this, navigate into a directory that has a `.daktari.py` (e.g. another repository intending to use your change) and run:
+
+```bash
+PYTHONPATH=~/daktari python3 -m daktari --debug
+```
+
+## Release instructions
+
+Daktari is continuously deployed via a github action - see [release.yaml](.github/workflows/release.yaml).
+In case of a need to manually release, the steps are:
+
+```
+bumpversion --verbose patch
+python setup.py sdist bdist_wheel
+twine check dist/*
+twine upload dist/*
+```
+
+
+
+
+%package help
+Summary: Development documents and examples for daktari
+Provides: python3-daktari-doc
+%description help
+**Daktari** is a tool to help the initial setup and ongoing maintenance of developer environments. It runs a series of checks (for example, that required software is installed) and provides suggestions on how to fix the issue if the check fails.
+
+## Configuration
+
+In the root of the project repository, create a `.daktari.py` configuration file listing the checks you want run. For example,
+
+```python
+from daktari.checks.git import *
+
+version = "0.0.97"
+title = "My Project"
+
+checks = [
+ GitInstalled(),
+ GitLfsInstalled(),
+ GitLfsSetUpForUser(),
+ GitLfsFilesDownloaded(),
+ GitCryptInstalled(),
+]
+```
+
+Then run `daktari` to diagnose your environment:
+
+```
+$ daktari
+✅ [git.installed] Git is installed
+✅ [git.lfs.installed] Git LFS is installed
+✅ [git.lfs.setUpForUser] Git LFS is set up for the current user
+✅ [git.lfs.filesDownloaded] Git LFS files have been downloaded
+❌ [git.crypt.installed] git-crypt is not installed
+┌─💡 Suggestion ─────────┐
+│ brew install git-crypt │
+└────────────────────────┘
+```
+
+## Custom Check
+
+You can write a custom check as a Python class within `.daktari.py`, and include it in your list of checks. Example of a check implementation:
+
+```python
+class GitCryptInstalled(Check):
+ name = "git.crypt.installed"
+ depends_on = [GitInstalled]
+
+ suggestions = {
+ OS.OS_X: "<cmd>brew install git-crypt</cmd>",
+ OS.UBUNTU: "<cmd>sudo apt install git-crypt</cmd>",
+ OS.GENERIC: "Install git-crypt (https://www.agwa.name/projects/git-crypt/)",
+ }
+
+ def check(self):
+ return self.verify(can_run_command("git crypt version"), "git-crypt is <not/> installed")
+```
+
+## Testing Daktari changes locally
+
+Having cloned the repo into `~/daktari`, you can make use of PYTHONPATH to run daktari using your local changes.
+
+To do this, navigate into a directory that has a `.daktari.py` (e.g. another repository intending to use your change) and run:
+
+```bash
+PYTHONPATH=~/daktari python3 -m daktari --debug
+```
+
+## Release instructions
+
+Daktari is continuously deployed via a github action - see [release.yaml](.github/workflows/release.yaml).
+In case of a need to manually release, the steps are:
+
+```
+bumpversion --verbose patch
+python setup.py sdist bdist_wheel
+twine check dist/*
+twine upload dist/*
+```
+
+
+
+
+%prep
+%autosetup -n daktari-0.0.97
+
+%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-daktari -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 0.0.97-1
+- Package Spec generated