From 7333a051c2efe3abc73ceacc88db0e758478e809 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 17:32:53 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .gitmodules | 2 +- MANIFEST.in | 2 +- pyproject.toml | 2 +- setup.cfg | 7 ++----- setup.py | 37 ++++++++++++------------------------- test/conftest.py | 2 +- 6 files changed, 18 insertions(+), 34 deletions(-) diff --git a/.gitmodules b/.gitmodules index d86a1cc..d2069c2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "auto-07p"] path = ext/auto-07p - url = https://github.com/klunkean/auto-07p.git \ No newline at end of file + url = https://github.com/klunkean/auto-07p.git diff --git a/MANIFEST.in b/MANIFEST.in index 1ddce6f..3f9880d 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,3 @@ recursive-include ext/auto-07p * recursive-include doc * -recursive-include test * \ No newline at end of file +recursive-include test * diff --git a/pyproject.toml b/pyproject.toml index ae88aa2..b3e1a07 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,4 +19,4 @@ before-test = "" test-requires = ["pytest"] test-extras = "test" -manylinux-x86_64-image = "manylinux2014" \ No newline at end of file +manylinux-x86_64-image = "manylinux2014" diff --git a/setup.cfg b/setup.cfg index 3a794c4..ae12353 100644 --- a/setup.cfg +++ b/setup.cfg @@ -8,14 +8,11 @@ url = https://github.com/klunkean/pyfurc author = klunkean author_email = klunkean@posteo.de license = BSD-3-Clause -license_file = LICENSE +license_files = LICENSE classifiers = License :: OSI Approved :: BSD License Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 project_urls = Documentation = https://pyfurc.readthedocs.io/ @@ -44,7 +41,7 @@ docs = jupyter-sphinx pydata-sphinx-theme sphinx - sphinx_lesson + sphinx-lesson sphinxcontrib-bibtex test = pytest diff --git a/setup.py b/setup.py index 702fa4a..b1abe29 100644 --- a/setup.py +++ b/setup.py @@ -1,15 +1,15 @@ +import os +import shutil import subprocess +from distutils import log as distutils_logger +from distutils.command.install_data import install_data +from glob import glob from setuptools import setup from setuptools.command.build_ext import build_ext -from setuptools.extension import Extension from setuptools.command.install_lib import install_lib -from distutils.command.install_data import install_data -from distutils import log as distutils_logger +from setuptools.extension import Extension from wheel.bdist_wheel import bdist_wheel -import os -import shutil -from glob import glob class custom_bdist_wheel(bdist_wheel): @@ -44,28 +44,18 @@ def run(self): auto_lib_file = os.path.join(auto_lib_dir, "libauto.so") install_auto_dir = os.path.join("pyfurc.ext", "auto-07p") # include AUTO license file - license_file = os.path.join( - self.distribution.bin_dir, "LICENSE" - ) - license_target_dir = os.path.join( - self.install_dir, install_auto_dir - ) + license_file = os.path.join(self.distribution.bin_dir, "LICENSE") + license_target_dir = os.path.join(self.install_dir, install_auto_dir) os.makedirs(license_target_dir, exist_ok=True) shutil.move(license_file, license_target_dir) - lib_target_dir = os.path.join( - self.install_dir, install_auto_dir, "lib" - ) + lib_target_dir = os.path.join(self.install_dir, install_auto_dir, "lib") os.makedirs(lib_target_dir, exist_ok=True) shutil.move(auto_lib_file, lib_target_dir) self.distribution.data_files = [ - os.path.join( - lib_target_dir, os.path.basename(auto_lib_file) - ), - os.path.join( - license_target_dir, os.path.basename(license_file) - ), + os.path.join(lib_target_dir, os.path.basename(auto_lib_file)), + os.path.join(license_target_dir, os.path.basename(license_file)), ] self.distribution.run_command("install_data") @@ -106,10 +96,7 @@ def build_extension(self, ext): env["FFLAGS"] = "-Wall -fPIC" manylinux_build_tag = "x86_64-redhat-linux" target_build_tag = "x86_64-pc-linux-gnu" - clean_cmd = [ - "make", - "superclean" - ] + clean_cmd = ["make", "superclean"] clean_process = subprocess.Popen( clean_cmd, cwd=auto_src_dir, diff --git a/test/conftest.py b/test/conftest.py index 91fc2e9..bd3175e 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -11,7 +11,7 @@ def symmetric_bifurcation_problem(): P = pf.Load("P") # first bifurcation point will be at exactly P = 1, phi = 0 - V = pf.Energy(1 / 2 * phi ** 2 - P * (1 - sp.cos(phi))) + V = pf.Energy(1 / 2 * phi**2 - P * (1 - sp.cos(phi))) bf = pf.BifurcationProblem(V, name="hinged_cantilever") # Set maximum load to double the critical load