From 90710728cd813202727f53cd169236b144918040 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Tue, 20 Jun 2023 06:43:23 +0000 Subject: automatic import of python-FormulaBasedMaterials --- python-formulabasedmaterials.spec | 132 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 python-formulabasedmaterials.spec (limited to 'python-formulabasedmaterials.spec') diff --git a/python-formulabasedmaterials.spec b/python-formulabasedmaterials.spec new file mode 100644 index 0000000..35fd7ec --- /dev/null +++ b/python-formulabasedmaterials.spec @@ -0,0 +1,132 @@ +%global _empty_manifest_terminate_build 0 +Name: python-FormulaBasedMaterials +Version: 0.2.3 +Release: 1 +Summary: A code for generating Formula-Based Materials into Voxel, STL files. +License: MIT +URL: https://github.com/MicDonald/FormulaBasedMaterials +Source0: https://mirrors.aliyun.com/pypi/web/packages/58/90/73658cb2afc881dc7d88f34969a41c972b4cfe23345c24c3e1be53ca263f/FormulaBasedMaterials-0.2.3.tar.gz +BuildArch: noarch + + +%description +# FormulaBasedMaterials +Generate Formula-Based Materials into Voxel, STL files + +# Usage: + +``` +pip install FormulaBasedMaterials +``` + +```python +import matplotlib.pyplot as plt +%matplotlib inline +import FormulaBasedMaterials as FBM + +test_SingleFM=FBM.SingleFormulaBasedMaterial(formula='sin(x)*cos(y)+sin(y)*cos(z)+sin(z)*cos(x)+1', l=10, r=[1,1,1], a=[1,1,1], eps=0.2, res=0.2) +test_SingleFM=FBM.SingleFormulaBasedMaterial(unit='random') +test_SingleFM=FBM.SingleFormulaBasedMaterial(unit='SchD') +test_SingleFM=FBM.SingleFormulaBasedMaterial(unit='gyroid') +test_SingleFM.formSolid(save=True,smooth=True) +test_SingleFM.formSurface(save=False) +``` + +%package -n python3-FormulaBasedMaterials +Summary: A code for generating Formula-Based Materials into Voxel, STL files. +Provides: python-FormulaBasedMaterials +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-FormulaBasedMaterials +# FormulaBasedMaterials +Generate Formula-Based Materials into Voxel, STL files + +# Usage: + +``` +pip install FormulaBasedMaterials +``` + +```python +import matplotlib.pyplot as plt +%matplotlib inline +import FormulaBasedMaterials as FBM + +test_SingleFM=FBM.SingleFormulaBasedMaterial(formula='sin(x)*cos(y)+sin(y)*cos(z)+sin(z)*cos(x)+1', l=10, r=[1,1,1], a=[1,1,1], eps=0.2, res=0.2) +test_SingleFM=FBM.SingleFormulaBasedMaterial(unit='random') +test_SingleFM=FBM.SingleFormulaBasedMaterial(unit='SchD') +test_SingleFM=FBM.SingleFormulaBasedMaterial(unit='gyroid') +test_SingleFM.formSolid(save=True,smooth=True) +test_SingleFM.formSurface(save=False) +``` + +%package help +Summary: Development documents and examples for FormulaBasedMaterials +Provides: python3-FormulaBasedMaterials-doc +%description help +# FormulaBasedMaterials +Generate Formula-Based Materials into Voxel, STL files + +# Usage: + +``` +pip install FormulaBasedMaterials +``` + +```python +import matplotlib.pyplot as plt +%matplotlib inline +import FormulaBasedMaterials as FBM + +test_SingleFM=FBM.SingleFormulaBasedMaterial(formula='sin(x)*cos(y)+sin(y)*cos(z)+sin(z)*cos(x)+1', l=10, r=[1,1,1], a=[1,1,1], eps=0.2, res=0.2) +test_SingleFM=FBM.SingleFormulaBasedMaterial(unit='random') +test_SingleFM=FBM.SingleFormulaBasedMaterial(unit='SchD') +test_SingleFM=FBM.SingleFormulaBasedMaterial(unit='gyroid') +test_SingleFM.formSolid(save=True,smooth=True) +test_SingleFM.formSurface(save=False) +``` + +%prep +%autosetup -n FormulaBasedMaterials-0.2.3 + +%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-FormulaBasedMaterials -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Jun 20 2023 Python_Bot - 0.2.3-1 +- Package Spec generated -- cgit v1.2.3