-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python312Packages.beancount3: init at 3.0.0 #371541
Open
alapshin
wants to merge
4
commits into
NixOS:master
Choose a base branch
from
alapshin:beancount3
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+185
−6
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
lib, | ||
beautifulsoup4, | ||
buildPythonPackage, | ||
click, | ||
fetchPypi, | ||
isPy3k, | ||
meson, | ||
meson-python, | ||
pytestCheckHook, | ||
python-dateutil, | ||
regex, | ||
}: | ||
|
||
buildPythonPackage rec { | ||
version = "3.0.0"; | ||
pname = "beancount"; | ||
pyproject = true; | ||
|
||
disabled = !isPy3k; | ||
|
||
src = fetchPypi { | ||
inherit pname version; | ||
hash = "sha256-z2aGhpx+o+78CU7hPthmv196K7DGHk1PXfPjX4Rs/98="; | ||
}; | ||
|
||
# Tests require files not included in the PyPI archive. | ||
# Also there is an import error after migration to meson build. | ||
doCheck = false; | ||
|
||
build-system = [ | ||
meson | ||
meson-python | ||
]; | ||
|
||
depedencies = [ | ||
click | ||
python-dateutil | ||
regex | ||
]; | ||
|
||
nativeCheckInputs = [ | ||
pytestCheckHook | ||
]; | ||
|
||
propagatedBuildInputs = [ | ||
beautifulsoup4 | ||
click | ||
python-dateutil | ||
regex | ||
]; | ||
|
||
pythonImportsCheck = [ "beancount" ]; | ||
|
||
meta = with lib; { | ||
homepage = "https://github.com/beancount/beancount"; | ||
description = "Double-entry bookkeeping computer language"; | ||
longDescription = '' | ||
A double-entry bookkeeping computer language that lets you define | ||
financial transaction records in a text file, read them in memory, | ||
generate a variety of reports from them, and provides a web interface. | ||
''; | ||
license = licenses.gpl2Only; | ||
maintainers = with maintainers; [ bhipple ]; | ||
}; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
lib, | ||
beancount, | ||
buildPythonPackage, | ||
chardet, | ||
click, | ||
fetchFromGitHub, | ||
lxml, | ||
petl, | ||
python-magic, | ||
pytestCheckHook, | ||
regex, | ||
setuptools, | ||
}: | ||
buildPythonPackage { | ||
pname = "beangulp"; | ||
version = "0.2.0-unstable-2025-01-02"; | ||
pyproject = true; | ||
|
||
src = fetchFromGitHub { | ||
owner = "beancount"; | ||
repo = "beangulp"; | ||
rev = "f8d2bc5da40e74461772dcb8e8394fa3c1b2a65d"; | ||
hash = "sha256-uAVsZI+yKdtkS7b9sUIxzzrqouYVwYHopqSIrKF5mmw="; | ||
}; | ||
|
||
build-system = [ setuptools ]; | ||
|
||
dependencies = [ | ||
beancount | ||
chardet | ||
click | ||
lxml | ||
python-magic | ||
]; | ||
|
||
nativeCheckInputs = [ | ||
petl | ||
pytestCheckHook | ||
regex | ||
]; | ||
|
||
pythonImportsCheck = [ | ||
"beangulp" | ||
]; | ||
|
||
meta = { | ||
homepage = "https://github.com/beancount/beangulp"; | ||
description = "Importers framework for Beancount"; | ||
longDescription = '' | ||
Beangulp provides a framework for importing transactions into a Beancoount | ||
ledger from account statements and other documents and for managing documents. | ||
''; | ||
license = lib.licenses.gpl2Only; | ||
maintainers = with lib.maintainers; [ alapshin ]; | ||
}; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
lib, | ||
buildPythonPackage, | ||
fetchPypi, | ||
pytestCheckHook, | ||
setuptools, | ||
setuptools-scm, | ||
}: | ||
buildPythonPackage rec { | ||
pname = "petl"; | ||
version = "1.7.15"; | ||
pyproject = true; | ||
|
||
src = fetchPypi { | ||
inherit pname version; | ||
hash = "sha256-jjFDg4CtUVUlOYZa07GrZV3htTG9A5gMhx7Cz/SoxBQ="; | ||
}; | ||
|
||
build-system = [ | ||
setuptools | ||
setuptools-scm | ||
]; | ||
|
||
nativeCheckInputs = [ | ||
pytestCheckHook | ||
]; | ||
|
||
pythonImportsCheck = [ | ||
"petl" | ||
]; | ||
|
||
meta = { | ||
homepage = "https://github.com/petl-developers/petl"; | ||
description = "Python Extract Transform and Load Tables of Data"; | ||
longDescription = '' | ||
A general purpose Python package for extracting, transforming and loading | ||
tables of data. | ||
''; | ||
license = lib.licenses.mit; | ||
mainProgram = "petl"; | ||
}; | ||
} |
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is very cumbersome to override python3Packages to build fava with beancount3 due to the strange design in python3Packages. Can we just build fava with beancount3? May this cause compatibility issues?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it help if, instead of accepting python3Packages, the package accepted beancount dependency directly?I think this wouldn't work since package usesbuildPythonApplication
It is possible to build Fava either with v2 or v3, but as far as I understand depending on version used Fava uses different approach for importers under the hood
https://github.com/beancount/fava/blob/main/CHANGES
Also, I'm not sure if it is a good idea to mix-match beancount version between different packages (fava, beanprice, beanquery, beangulp, etc.).