Skip to content

Commit

Permalink
Update to Python 3.11
Browse files Browse the repository at this point in the history
I want Python 3.11 for toml support in the standard library.
  • Loading branch information
ruuda committed Mar 2, 2023
1 parent b1c7485 commit 8fd064c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
web: FLASK_ENV=development python -m flask run --port $PORT
web: python -m flask --debug run --port $PORT
db: PGHOST=$PWD/run/db_dev tools/run_postgres.py run/db_dev
8 changes: 4 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 9 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
description = "Hanson";

inputs = {
nixpkgs.url = "nixpkgs/fcd48a5a0693f016a5c370460d0c2a8243b882dc";
nixpkgs.url = "nixpkgs/nixos-unstable";
utils.url = "github:numtide/flake-utils";
};

Expand All @@ -24,9 +24,15 @@
# we include it like this, then Mypy *can* typecheck Flask functions.
ps.mypy
ps.pytest

# These do not strictly need to be here, but if we import them into our
# development shell from the top level, we get multiple Python
# interpreters in there, it's nicer to only have a single one.
ps.black
ps.mkdocs
];

python = pkgs.python3.override {
python = pkgs.python311.override {
packageOverrides = self: super: {
hanson = self.buildPythonPackage rec {
pname = "hanson";
Expand All @@ -39,23 +45,20 @@

# For development, we want a Python that has all our dependent packages,
# but not Hanson itself as a package.
pythonDev = pkgs.python3.withPackages (ps:
pythonDev = python.withPackages (ps:
(runtimeDependencies ps) ++ (developmentDependencies ps)
);

hanson = python.pkgs.toPythonApplication python.pkgs.hanson;

in
{
devShells = {
default = pkgs.mkShell {
name = "hanson";

nativeBuildInputs = [
pkgs.black
pkgs.overmind
pkgs.postgresql_14
pkgs.mkdocs
pythonDev
];

Expand Down

0 comments on commit 8fd064c

Please sign in to comment.