summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--python-pydantic-to-typescript.spec91
-rw-r--r--sources1
3 files changed, 93 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..e482fca 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/pydantic-to-typescript-1.0.10.tar.gz
diff --git a/python-pydantic-to-typescript.spec b/python-pydantic-to-typescript.spec
new file mode 100644
index 0000000..4611b94
--- /dev/null
+++ b/python-pydantic-to-typescript.spec
@@ -0,0 +1,91 @@
+%global _empty_manifest_terminate_build 0
+Name: python-pydantic-to-typescript
+Version: 1.0.10
+Release: 1
+Summary: Convert pydantic models to typescript interfaces
+License: MIT
+URL: https://github.com/phillipdupuis/pydantic-to-typescript
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/75/96/125e3368b44a3e1c82f484c6ad7df97c01d85ad3b9e99ead249373e50a72/pydantic-to-typescript-1.0.10.tar.gz
+BuildArch: noarch
+
+Requires: python3-pydantic
+Requires: python3-pytest
+Requires: python3-pytest-cov
+Requires: python3-coverage
+
+%description
+### CLI
+| Prop | Description |
+| :------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| ‑‑module | name or filepath of the python module you would like to convert. All the pydantic models within it will be converted to typescript interfaces. Discoverable submodules will also be checked. |
+| ‑‑output | name of the file the typescript definitions should be written to. Ex: './frontend/apiTypes.ts' |
+| ‑‑exclude | name of a pydantic model which should be omitted from the resulting typescript definitions. This option can be defined multiple times, ex: `--exclude Foo --exclude Bar` to exclude both the Foo and Bar models from the output. |
+
+%package -n python3-pydantic-to-typescript
+Summary: Convert pydantic models to typescript interfaces
+Provides: python-pydantic-to-typescript
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-pydantic-to-typescript
+### CLI
+| Prop | Description |
+| :------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| ‑‑module | name or filepath of the python module you would like to convert. All the pydantic models within it will be converted to typescript interfaces. Discoverable submodules will also be checked. |
+| ‑‑output | name of the file the typescript definitions should be written to. Ex: './frontend/apiTypes.ts' |
+| ‑‑exclude | name of a pydantic model which should be omitted from the resulting typescript definitions. This option can be defined multiple times, ex: `--exclude Foo --exclude Bar` to exclude both the Foo and Bar models from the output. |
+
+%package help
+Summary: Development documents and examples for pydantic-to-typescript
+Provides: python3-pydantic-to-typescript-doc
+%description help
+### CLI
+| Prop | Description |
+| :------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| ‑‑module | name or filepath of the python module you would like to convert. All the pydantic models within it will be converted to typescript interfaces. Discoverable submodules will also be checked. |
+| ‑‑output | name of the file the typescript definitions should be written to. Ex: './frontend/apiTypes.ts' |
+| ‑‑exclude | name of a pydantic model which should be omitted from the resulting typescript definitions. This option can be defined multiple times, ex: `--exclude Foo --exclude Bar` to exclude both the Foo and Bar models from the output. |
+
+%prep
+%autosetup -n pydantic-to-typescript-1.0.10
+
+%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-pydantic-to-typescript -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.10-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..7609650
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+5a1e93d2b0a7a7b89f9aa1e811624a28 pydantic-to-typescript-1.0.10.tar.gz