Skip to content

Commit

Permalink
Enhance Python build scripts
Browse files Browse the repository at this point in the history
* Add Python build specific files
* Add "console_scripts" to "setup.py" and enhance requirements resolution

Signed-off-by: Tobias Wolf <[email protected]>
  • Loading branch information
NotTheEvilOne authored Mar 20, 2024
1 parent cdb0c2e commit d92f3b6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = [ "setuptools", "wheel" ]
build-backend = "setuptools.build_meta"

[project]
dynamic = ["version"]
dynamic = ["dependencies", "scripts", "version"]
requires-python = ">=3.9"

name = "Rookify"
Expand Down
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
[metadata]
platforms = any

[options]
install_requires=file:requirements.txt
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
limitations under the License.
"""

import os
from typing import Dict, Any

try:
Expand All @@ -32,14 +33,13 @@ def get_version() -> str:
:since: v0.0.1
"""

return "v0.0.1"
return os.environ.get("ROOKIFY_VERSION", "0.0.0-dev")


#

_setup: Dict[str, Any] = {
"version": get_version()[1:],
"version": get_version(),
"data_files": [("docs", ["LICENSE", "README.md"])],
"entry_points": {"console_scripts": ["rookify = rookify.__main__:main"]},
"test_suite": "tests",
}

Expand Down

0 comments on commit d92f3b6

Please sign in to comment.