Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 18, 2024
1 parent fabef28 commit 1075358
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "auto-07p"]
path = ext/auto-07p
url = https://github.com/klunkean/auto-07p.git
url = https://github.com/klunkean/auto-07p.git
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
recursive-include ext/auto-07p *
recursive-include doc *
recursive-include test *
recursive-include test *
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ before-test = ""
test-requires = ["pytest"]
test-extras = "test"

manylinux-x86_64-image = "manylinux2014"
manylinux-x86_64-image = "manylinux2014"
7 changes: 2 additions & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand Down Expand Up @@ -44,7 +41,7 @@ docs =
jupyter-sphinx
pydata-sphinx-theme
sphinx
sphinx_lesson
sphinx-lesson
sphinxcontrib-bibtex
test =
pytest
37 changes: 12 additions & 25 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down Expand Up @@ -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")

Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1075358

Please sign in to comment.