Title: [IfcPatch]Create proper CLI entrypoint / script · Issue #6436 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: [IfcPatch]Create proper CLI entrypoint / script · Issue #6436 · IfcOpenShell/IfcOpenShell
X Title: [IfcPatch]Create proper CLI entrypoint / script · Issue #6436 · IfcOpenShell/IfcOpenShell
Description: Feature Description Currently, ifcPatch CLI can only be run via python -m ifcpatch. The current instructions to use an alias may work, but its doesn't play well with multiple environments, especially now that we have easy to use isolated...
Open Graph Description: Feature Description Currently, ifcPatch CLI can only be run via python -m ifcpatch. The current instructions to use an alias may work, but its doesn't play well with multiple environments, especial...
X Description: Feature Description Currently, ifcPatch CLI can only be run via python -m ifcpatch. The current instructions to use an alias may work, but its doesn't play well with multiple environments, espe...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/6436
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[IfcPatch]Create proper CLI entrypoint / script","articleBody":"**Feature Description**\n\nCurrently, ifcPatch CLI can only be run via `python -m ifcpatch`.\nThe current instructions to use an alias may work, but its doesn't play well with multiple environments, especially now that we have easy to use isolated environment managers such as pipx and uv.\n\nUsing the wonderful uv as an example, to run ifcpatch in an ephemeral environment, one needs to:\n\n```shell\nuvx --with ifcpatch python -m ifcpatch ...\n```\n\ninstead of just `uvx ifcpatch ...` as one would expect.\n\n```shell\n$ uvx ifcpatch -h\nThe executable `ifcpatch` was not found.\nwarning: Package `ifcpatch` does not provide any executables.\n```\n\nthis also makes it impossible to install ifcpatch with `uv tool install` which errors out with the `No executables are provided by ifcpatch` message.\n\nPython already has all we need to create a proper cross platform executable via the [`project.scripts` table](https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#creating-executable-scripts)\n\nsince this config needs a function, it cannot points to the `__main__` module directly, unless we wrap everything inside it in a `main` function \n\n```python\ndef main():\n # current contents of __main__.py\n\nif __name__ == \"__main__\":\n main()\n```\n\nand then use it in the pyproject.toml\n\n```toml\n[project.scripts]\nifcpatch = \"ifcpatch.__main__:main\"\n```\n\nto be more explicit, the `main` function could be named `cli` and put into a `cli` module.","author":{"url":"https://github.com/sanzoghenzo","@type":"Person","name":"sanzoghenzo"},"datePublished":"2025-03-25T09:33:27Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/6436"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1bf70e1c-2df8-865f-d99b-418f3aacbec8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E614:282FC:6C1F18:91258A:6B04A9ED |
| html-safe-nonce | a95fd1313d8089acacc269b002f89f9dd23e2b63ca4bbfc9797b9d0bf7c181f9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNjE0OjI4MkZDOjZDMUYxODo5MTI1OEE6NkIwNEE5RUQiLCJ2aXNpdG9yX2lkIjoiMTA0ODI5NzUyMDQxMDk2MjQxNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9e0fb7a3a881747352803a3c2d7cbe293759e69000f0bdce2646f89262de379d |
| hovercard-subject-tag | issue:2945889953 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/IfcOpenShell/IfcOpenShell/6436/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1fa2f843cc53f9ef6d59b9669fb89691731c99998b0b39237b80bf27f74f11a1/IfcOpenShell/IfcOpenShell/issues/6436 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1fa2f843cc53f9ef6d59b9669fb89691731c99998b0b39237b80bf27f74f11a1/IfcOpenShell/IfcOpenShell/issues/6436 |
| og:image:alt | Feature Description Currently, ifcPatch CLI can only be run via python -m ifcpatch. The current instructions to use an alias may work, but its doesn't play well with multiple environments, especial... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sanzoghenzo |
| hostname | github.com |
| expected-hostname | github.com |
| None | 188497a0f45a7aa8f7c866faa1950d1a7f8d82b59416adf549b222ad1d1dd19b |
| turbo-cache-control | no-preview |
| go-import | github.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git |
| octolytics-dimension-user_id | 13692563 |
| octolytics-dimension-user_login | IfcOpenShell |
| octolytics-dimension-repository_id | 40473201 |
| octolytics-dimension-repository_nwo | IfcOpenShell/IfcOpenShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 40473201 |
| octolytics-dimension-repository_network_root_nwo | IfcOpenShell/IfcOpenShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 557cfbac6cdb532730c95c90f2cefdc0c4128029 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width