takunomi-build-bot
65a48b471e
This commit was automatically generated by a script: https://gitfub.space/Jmaa/repo-manager
93 lines
2.6 KiB
Python
93 lines
2.6 KiB
Python
# WARNING
|
|
#
|
|
# THIS IS AN AUTOGENERATED FILE.
|
|
#
|
|
# MANUAL CHANGES CAN AND WILL BE OVERWRITTEN.
|
|
|
|
import re
|
|
|
|
from setuptools import setup
|
|
|
|
PACKAGE_NAME = 'crypto_tax'
|
|
|
|
PACKAGE_DESCRIPTION = """
|
|
# Crypto Tax.
|
|
|
|
Tool to automatically perform tax computations of crypto transactions from the danish perspective.
|
|
|
|
Produces an Excel report containing the following sheets:
|
|
|
|
- **Overview Sheet**: An overview sheet with the suggested report values.
|
|
- **Current Assets**: Containing currently held assets.
|
|
- **Ledger**: Ledger of all registered transactions.
|
|
- Various **FIFO** sheets for the different asset classes.
|
|
|
|
## Usage
|
|
|
|
Make a `/secrets` folder, and place relevant secrets there.
|
|
|
|
Run `python -m crypto_tax`
|
|
|
|
## Disclaimer
|
|
|
|
This tool is a work in progress, and may contain outdated or plain faulty
|
|
logic. The information gathered from crypto exchanges may be incorrect.
|
|
|
|
When using the produced reports, you acknowledge that you bear the full
|
|
responsiblity of reporting the correct information to SKAT, and that you have
|
|
validated the generated output.
|
|
|
|
The report suggestions are informal suggestions, and is not professional
|
|
guidance. I bear no responsiblity for faults in the generated tax reports.
|
|
|
|
## TODO
|
|
|
|
This tool is a work in progress:
|
|
|
|
- [ ] Support Partisia Blockchain
|
|
- [ ] Fix Kucoin issues.
|
|
- [ ] Adjust the account provider column.
|
|
- [X] Produce Excel output file:
|
|
* Sheet 1: Gives a basic overview, including computed tax values from the rest of
|
|
the sheet, and reasonings for these. Gives an overview of the other sheets.
|
|
* Sheet 2: Current assets, including FIFO acquisition prices.
|
|
* Sheet 3: Historic sales, with FIFO.
|
|
""".strip()
|
|
|
|
PACKAGE_DESCRIPTION_SHORT = """
|
|
Tool to automatically perform tax computations of crypto transactions from the danish perspective.""".strip()
|
|
|
|
|
|
def parse_version_file(text: str) -> str:
|
|
match = re.match(r'^__version__\s*=\s*(["\'])([\d\.]+)\1$', text)
|
|
if match is None:
|
|
msg = 'Malformed _version.py file!'
|
|
raise Exception(msg)
|
|
return match.group(2)
|
|
|
|
|
|
with open(PACKAGE_NAME + '/_version.py') as f:
|
|
version = parse_version_file(f.read())
|
|
|
|
|
|
REQUIREMENTS_MAIN = []
|
|
REQUIREMENTS_TEST = []
|
|
|
|
|
|
setup(
|
|
name=PACKAGE_NAME,
|
|
version=version,
|
|
description=PACKAGE_DESCRIPTION_SHORT,
|
|
long_description=PACKAGE_DESCRIPTION,
|
|
long_description_content_type='text/markdown',
|
|
author='Jon Michael Aanes',
|
|
author_email='jonjmaa@gmail.com',
|
|
url='https://gitfub.space/Jmaa/' + PACKAGE_NAME,
|
|
packages=[PACKAGE_NAME],
|
|
install_requires=REQUIREMENTS_MAIN,
|
|
extras_require={
|
|
'test': REQUIREMENTS_TEST,
|
|
},
|
|
python_requires='>=3.9',
|
|
)
|