Skip to content

Commit

Permalink
Migrate away from setup.cfg
Browse files Browse the repository at this point in the history
In preparation for
pypa/setuptools#3214
  • Loading branch information
maxwell-k committed Jan 14, 2024
1 parent 7bc1bb6 commit cb11564
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 51 deletions.
8 changes: 8 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[flake8]
max-line-length = 88
extend-ignore = E203
exclude =
.git,
.venv,
__pycache__,
docs
45 changes: 45 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,48 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "qgridtrusted"
dynamic = ["version"]
readme = "README.md"
description = "An Interactive Grid for Sorting and Filtering DataFrames in Jupyter Notebook"
authors = [
{ name = "Quantopian Inc.", email = "opensource@quantopian.com" },
]
license = { file = "LICENSE" }
dependencies = [
"notebook",
"pandas",
"ipywidgets",
]
keywords = ["ipython", "jupyter", "widgets"]
classifiers = [
"Development Status :: 4 - Beta",
"Framework :: IPython",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Topic :: Office/Business :: Financial",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Multimedia :: Graphics",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]

[project.urls]
Homepage = "https://github.com/maxwell-k/qgridtrusted/"

[project.optional-dependencies]
test = ["pytest", "flake8"]

[tool.setuptools]
zip-safe = false

[tool.setuptools.dynamic]
version = { attr = "qgrid._version.__version__" }

[tool.setuptools.packages.find]
where = ["."]
exclude = ["js"]
namespaces = false
48 changes: 0 additions & 48 deletions setup.cfg

This file was deleted.

5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from setuptools.command.build_py import build_py
from setuptools.command.sdist import sdist

STATIC = Path(__file__).parent / "qgrid" / "static"
STATIC = Path("qgrid") / "static"
TARGETS = [STATIC / "extension.js", STATIC / "index.js"]
STATIC.mkdir(exist_ok=True)

Expand Down Expand Up @@ -39,8 +39,7 @@ def run(self):
logging.error("`npm` unavailable.")
else:
logging.info("Running `npm install`. This may take a while.")
cwd = Path(__file__).parent / "js"
run(["npm", "install"], cwd=cwd, check=True)
run(["npm", "install"], cwd="js", check=True)

if missing := [i for i in TARGETS if not i.is_file()]:
raise ValueError("Missing files: %s" % missing)
Expand Down

0 comments on commit cb11564

Please sign in to comment.