Skip to content

Commit 347c1ed

Browse files
authored
Pypi package fails to generate code (#39)
* Add flake * Update deps * Update pyproject.toml
1 parent e2d2a1d commit 347c1ed

File tree

5 files changed

+117
-4
lines changed

5 files changed

+117
-4
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
### Project-specific ###
22
.vscode
3+
.direnv/
4+
.envrc
35

46
# Created by https://www.toptal.com/developers/gitignore/api/windows,linux,macos,vim,emacs,visualstudiocode,jetbrains+all,python
57
# Edit at https://www.toptal.com/developers/gitignore?templates=windows,linux,macos,vim,emacs,visualstudiocode,jetbrains+all,python

flake.lock

Lines changed: 61 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
description = "AsyncAPI Python Code Generator - type-safe async Python from AsyncAPI 3 specs";
3+
4+
inputs = {
5+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
6+
flake-utils.url = "github:numtide/flake-utils";
7+
};
8+
9+
outputs =
10+
{
11+
self,
12+
nixpkgs,
13+
flake-utils,
14+
}:
15+
flake-utils.lib.eachDefaultSystem (
16+
system:
17+
let
18+
pkgs = nixpkgs.legacyPackages.${system};
19+
python = pkgs.python310;
20+
in
21+
{
22+
devShells.default = pkgs.mkShell {
23+
name = "asyncapi-python";
24+
25+
packages = with pkgs; [
26+
python
27+
uv
28+
];
29+
30+
shellHook = ''
31+
export UV_PYTHON_PREFERENCE=only-system
32+
33+
if [ ! -d .venv ]; then
34+
echo "Creating virtual environment..."
35+
uv venv
36+
fi
37+
38+
source .venv/bin/activate
39+
40+
echo "AsyncAPI Python development environment"
41+
echo "Python: $(python --version)"
42+
echo "uv: $(uv --version)"
43+
'';
44+
};
45+
}
46+
);
47+
}

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "asyncapi-python"
3-
version = "0.3.0rc10"
3+
version = "0.3.0"
44
license = { text = "Apache-2.0" }
55
description = "Easily generate type-safe and async Python applications from AsyncAPI 3 specifications."
66
authors = [{ name = "Yaroslav Petrov", email = "yaroslav.v.petrov@gmail.com" }]
@@ -11,7 +11,8 @@ dependencies = ["pydantic>=2", "pytz"]
1111
[project.optional-dependencies]
1212
codegen = [
1313
"jinja2>=3.1.4",
14-
"typer[all]>=0.12.5",
14+
"typer>=0.15.0",
15+
"click>=8.0.0",
1516
"pyyaml",
1617
"datamodel-code-generator[http]>=0.26.4",
1718
"black",

uv.lock

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)