Skip to content
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
logs
dist
build/
*.egg-info
*.pyc
__pycache__/
*.db
config.inc.sh
make_profile.db
test/make.svg
test/target11
2 changes: 1 addition & 1 deletion make_profiler/dot_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def critical_path(influences, dependencies, inputs, timing):
cp = set()
timing_tags = {}
for t, z in targets.items():
if z["early_start"] == z["late_start"]:
if z["early_start"] == z.get("late_start"):
cp.add(t)
if z["pin_timing_tag"]:
if z["timing_tag"] not in timing_tags:
Expand Down
2 changes: 1 addition & 1 deletion make_profiler/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def parse(fd):
def parse_target(token):
line = token[1]
target, deps, order_deps, docstring = re.match(
'(.+): \s? ([^|#]+)? \s? [|]? \s? ([^##]+)? \s? \s? ([#][#].+)?',
r'(.+): \s? ([^|#]+)? \s? [|]? \s? ([^##]+)? \s? \s? ([#][#].+)?',
line,
re.X
).groups()
Expand Down
32 changes: 32 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "make-profiler"
version = "1.0.0"
authors = [
{ name="Darafei Praliaskouski", email="komzpa@gojuno.com" },
]
maintainers = [
{ name="Alexander Verbitsky", email="averbitsky@gojuno.com" },
]
description = "Profiler for Makefiles"
readme = "README.md"
requires-python = ">=3.12"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Topic :: Utilities",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: BSD License",
]
dependencies = [
"more-itertools>=6.0.0",
]

[project.scripts]
profile_make_clean = "make_profiler.cmd_clean:main"
profile_make = "make_profiler.__main__:main"

[project.urls]
Homepage = "https://github.com/gojuno/make-profiler"
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import re
from setuptools import setup

MIN_PYTHON = (2, 7)
MIN_PYTHON = (3, 12)
if sys.version_info < MIN_PYTHON:
sys.stderr.write("Python {}.{} or later is required\n".format(*MIN_PYTHON))
sys.exit(1)
Expand Down Expand Up @@ -36,7 +36,7 @@ def read(fname):
packages=['make_profiler'],
test_suite='test',
install_requires=(
'more-itertools==2.4.1',
'more-itertools',
),
entry_points={
'console_scripts': [
Expand All @@ -48,7 +48,7 @@ def read(fname):
classifiers=[
'Development Status :: 5 - Production/Stable',
'Topic :: Utilities',
'Programming Language :: Python',
'Programming Language :: Python :: 3.12',
'License :: OSI Approved :: BSD License',
],
)