summaryrefslogtreecommitdiff
path: root/python-pubchempy.spec
diff options
context:
space:
mode:
Diffstat (limited to 'python-pubchempy.spec')
-rw-r--r--python-pubchempy.spec99
1 files changed, 99 insertions, 0 deletions
diff --git a/python-pubchempy.spec b/python-pubchempy.spec
new file mode 100644
index 0000000..a9d9fb5
--- /dev/null
+++ b/python-pubchempy.spec
@@ -0,0 +1,99 @@
+%global _empty_manifest_terminate_build 0
+Name: python-PubChemPy
+Version: 1.0.4
+Release: 1
+Summary: A simple Python wrapper around the PubChem PUG REST API.
+License: MIT
+URL: https://github.com/mcs07/PubChemPy
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/aa/fb/8de3aa9804b614dbc8dc5c16ed061d819cc360e0ddecda3dcd01c1552339/PubChemPy-1.0.4.tar.gz
+BuildArch: noarch
+
+
+%description
+PubChemPy provides a way to interact with PubChem in Python. It allows chemical searches by name, substructure and
+similarity, chemical standardization, conversion between chemical file formats, depiction and retrieval of chemical
+properties.
+ >>> from pubchempy import get_compounds, Compound
+ >>> comp = Compound.from_cid(1423)
+ >>> print(comp.isomeric_smiles)
+ CCCCCCCNC1CCCC1CCCCCCC(=O)O
+ >>> comps = get_compounds('Aspirin', 'name')
+ >>> print(comps[0].xlogp)
+ 1.2
+
+%package -n python3-PubChemPy
+Summary: A simple Python wrapper around the PubChem PUG REST API.
+Provides: python-PubChemPy
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-PubChemPy
+PubChemPy provides a way to interact with PubChem in Python. It allows chemical searches by name, substructure and
+similarity, chemical standardization, conversion between chemical file formats, depiction and retrieval of chemical
+properties.
+ >>> from pubchempy import get_compounds, Compound
+ >>> comp = Compound.from_cid(1423)
+ >>> print(comp.isomeric_smiles)
+ CCCCCCCNC1CCCC1CCCCCCC(=O)O
+ >>> comps = get_compounds('Aspirin', 'name')
+ >>> print(comps[0].xlogp)
+ 1.2
+
+%package help
+Summary: Development documents and examples for PubChemPy
+Provides: python3-PubChemPy-doc
+%description help
+PubChemPy provides a way to interact with PubChem in Python. It allows chemical searches by name, substructure and
+similarity, chemical standardization, conversion between chemical file formats, depiction and retrieval of chemical
+properties.
+ >>> from pubchempy import get_compounds, Compound
+ >>> comp = Compound.from_cid(1423)
+ >>> print(comp.isomeric_smiles)
+ CCCCCCCNC1CCCC1CCCCCCC(=O)O
+ >>> comps = get_compounds('Aspirin', 'name')
+ >>> print(comps[0].xlogp)
+ 1.2
+
+%prep
+%autosetup -n PubChemPy-1.0.4
+
+%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-PubChemPy -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.4-1
+- Package Spec generated