Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
move from setup.py to pyproject.toml
  • Loading branch information
ajmirsky committed Jun 18, 2025
commit 795e771ee5dbfc42fdd65f53300f6a50478e1c37
58 changes: 56 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,60 @@
[project]
name = "memory_profiler"
description = "A module for monitoring memory usage of a python program"
readme = "README.rst"
dynamic = ["version"]
license = { text = "BSD" }
license-files = { paths = ["COPYING"] }
authors = [{ name = "Fabian Pedregosa", email = "f@bianp.net" }]
urls = { Homepage = "https://github.com/pythonprofilers/memory_profiler" }
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Topic :: Software Development",
"Operating System :: POSIX",
"Operating System :: Unix"
]
requires-python = ">=3.9"
dependencies = [
"psutil>=0.0"
]

[dependency-groups]
dev = [
"hatch>=1.14.1"
]

[project.scripts]
mprof = "memory_profiler.mprof:main"


[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
requires = ["hatchling", "hatch-vcs", "uv-dynamic-versioning"]

build-backend = "hatchling.build"

[tool.hatch.build]
packages = [
"src/memory_profiler"
]
exclude = [
".venv*",
"tests/",
"**/tests/",
"**/*.pyc",
"**/__pycache__/",
"**/README.md",
]

[tool.hatch.build.targets.sdist]
include = ["/src/memory_profile", "README.rst"]

[tool.hatch.version]
source = "vcs"

[tool.codespell]
skip = './.git'
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions test/sample.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@profile
def my_func():
a = [1] * (10 ** 6)
b = [2] * (2 * 10 ** 7)
del b
return a

if __name__ == '__main__':
my_func()