Created
April 19, 2022 15:08
-
-
Save dholth/da296c2ef8da40de9165d6d5a0fe1fe2 to your computer and use it in GitHub Desktop.
sample enscons pyproject.toml, SConstruct
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[tool] | |
[tool.enscons] | |
name = "repodata-proxy" | |
version = "0.0.1" | |
author = "Daniel Holth" | |
author_email = "[email protected]" | |
src_root = "" | |
description = "Proxy to update repodata.json with little bandwidth" | |
install_requires = [ | |
"appdirs", | |
"requests", | |
"requests-cache", | |
"jsonpatch" | |
] | |
keywords = ["packaging"] | |
license = "MIT" | |
url = "https://github.com/dholth/repodata-fly" | |
[build-system] | |
requires = ["pytoml>=0.1", "enscons"] | |
build-backend = "enscons.api" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Starter SConstruct for enscons | |
# (filled by enscons.setup2toml) | |
import enscons | |
import pytoml as toml | |
metadata = dict(toml.load(open("pyproject.toml")))["tool"]["enscons"] | |
full_tag = "py3-none-any" | |
env = Environment( | |
tools=["default", "packaging", enscons.generate], | |
PACKAGE_METADATA=metadata, | |
WHEEL_TAG=full_tag, | |
) | |
# Only *.py is included automatically by setup2toml. | |
# Add extra 'purelib' files or package_data here. | |
py_source = [] | |
lib = env.Whl("purelib", py_source, root="") | |
whl = env.WhlFile(lib) | |
# Add automatic source files, plus any other needed files. | |
sdist_source = FindSourceFiles() + ["PKG-INFO"] | |
sdist = env.SDist(source=sdist_source) | |
env.NoClean(sdist) | |
env.Alias("sdist", sdist) | |
develop = env.Command("#DEVELOP", enscons.egg_info_targets(env), enscons.develop) | |
env.Alias("develop", develop) | |
# needed for pep517 / enscons.api to work | |
env.Default(whl, sdist) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment