Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.6.0
hooks:
- id: check-case-conflict
- id: check-merge-conflict
Expand All @@ -12,25 +12,25 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/asottile/pyupgrade
rev: v2.29.0
rev: v3.17.0
hooks:
- id: pyupgrade
name: PyUpgrade 3.8+
args: ["--py38-plus"]
exclude: ^bin/

- repo: https://github.com/PyCQA/isort
rev: 5.9.3
rev: 5.13.2
hooks:
- id: isort
args: [--profile, black]

- repo: https://github.com/psf/black
rev: 21.9b0
rev: 24.8.0
hooks:
- id: black

- repo: https://github.com/asottile/setup-cfg-fmt
rev: v1.18.0
rev: v2.5.0
hooks:
- id: setup-cfg-fmt
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
Loading