diff --git a/build-scripts/env.js b/build-scripts/env.js index 1320c137dd..b12f20582f 100644 --- a/build-scripts/env.js +++ b/build-scripts/env.js @@ -26,8 +26,8 @@ module.exports = { }, version() { const version = fs - .readFileSync(path.resolve(paths.polymer_dir, "setup.cfg"), "utf8") - .match(/version\W+=\W(\d{8}\.\d)/); + .readFileSync(path.resolve(paths.polymer_dir, "pyproject.toml"), "utf8") + .match(/version\W+=\W"(\d{8}\.\d)"/); if (!version) { throw Error("Version not found"); } diff --git a/pyproject.toml b/pyproject.toml index cad8f17be0..d271b65f99 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,30 @@ [build-system] -requires = ["setuptools~=60.5", "wheel~=0.37.1"] +requires = ["setuptools~=62.3", "wheel~=0.37.1"] build-backend = "setuptools.build_meta" + +[project] +name = "home-assistant-frontend" +version = "20220524.0" +license = {text = "Apache-2.0"} +description = "The Home Assistant frontend" +readme = "README.md" +authors = [ + {name = "The Home Assistant Authors", email = "hello@home-assistant.io"} +] +requires-python = ">=3.4.0" + +[project.urls] +"Homepage" = "https://github.com/home-assistant/frontend" + +[tool.setuptools] +platforms = ["any"] +zip-safe = false +include-package-data = true + +[tool.setuptools.packages.find] +include = ["hass_frontend*"] + +[tool.mypy] +python_version = 3.4 +show_error_codes = true +strict = true diff --git a/script/version_bump.js b/script/version_bump.js index 74fc3770e0..7796f1451a 100755 --- a/script/version_bump.js +++ b/script/version_bump.js @@ -50,14 +50,14 @@ async function main(args) { return; } - const setup = fs.readFileSync("setup.cfg", "utf8"); - const version = setup.match(/\d{8}\.\d+/)[0]; + const setup = fs.readFileSync("pyproject.toml", "utf8"); + const version = setup.match(/version\W+=\W"(\d{8}\.\d)"/)[1]; const newVersion = method(version); console.log("Current version:", version); console.log("New version:", newVersion); - fs.writeFileSync("setup.cfg", setup.replace(version, newVersion), "utf-8"); + fs.writeFileSync("pyproject.toml", setup.replace(version, newVersion), "utf-8"); if (!commit) { return; diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 951f1a8274..0000000000 --- a/setup.cfg +++ /dev/null @@ -1,26 +0,0 @@ -[metadata] -name = home-assistant-frontend -version = 20220524.0 -author = The Home Assistant Authors -author_email = hello@home-assistant.io -license = Apache-2.0 -platforms = any -description = The Home Assistant frontend -long_description = file: README.md -long_description_content_type = text/markdown -url = https://github.com/home-assistant/frontend - -[options] -packages = find: -zip_safe = False -include_package_data = True -python_requires = >= 3.4.0 - -[options.packages.find] -include = - hass_frontend* - -[mypy] -python_version = 3.4 -show_error_codes = True -strict = True