Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ Use this library if you're one of the following:

Intended for Ubuntu (and probably some other Unix-based systems) for now, although at least two people have managed to make it work in Windows. If you can't, feel free to ask for help :)



# Setup

- Run `bash setup.sh` (or run `setup.bat` if you're using Windows). If it prints `DONE`, then it was successful. Make sure you have `python3` and `pip3`.
- Navigate to the root directory of this repository (which includes the `pyproject.toml` file) and run `python3 -m pip install .`

- *Note:* It installs KompGen (and `setuptools`) via `pip`. Feel free to modify `setup.sh` if you don't want to install globally, e.g., if you want to use virtualenv or something.
- If you want to install this on, say, `python3.9` or `pypy3`, run `python3.9 -m pip install .` (or `pypy3`). I recommend installing it on the latest pypy3 version.

- If it issues errors for you, please read `setup.sh` and try to find a way to run each line somehow.
- *Note:* For pypy3 installed via `snap` or via `ppa:pypy/ppa`, I couldn't install things easily due to permission issues. I suggest installing pypy3 via [the instructions here](https://doc.pypy.org/en/latest/install.html#installing-pypy).

<!-- - (Optional) If you want to autocomplete commands in bash with tab, make sure that `AUTOCOMPLETE READY` was printed by `setup.sh`, and then add the following line in your `.bashrc`:

Expand All @@ -28,12 +26,7 @@ eval "$(register-python-argcomplete kg)"

- *Note:* This is still early on in development&mdash;we haven't even decided on the release cycle/method yet&mdash;so expect regular updates (pull from the repo regularly), and a few of them might be backwards-incompatible. We'll fix this soon, promise!


- If you want to install this on, say, `python3.9` or `pypy3`, run `bash setup.sh python3.9` (or `pypy3`). I recommend installing it on the latest pypy3 version.

- *Note:* For pypy3 installed via `snap` or via `ppa:pypy/ppa`, I couldn't install things easily due to permission issues. I suggest installing pypy3 via [the instructions here](https://doc.pypy.org/en/latest/install.html#installing-pypy).


- To uninstall, run `pip uninstall KompGen`.


# Useful scripts
Expand Down
58 changes: 58 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[build-system]
requires = ["setuptools >= 77.0.3"]
build-backend = "setuptools.build_meta"

[project]
name = "KompGen"
version = "0.2"
description= "Utilities for programming contests"
authors = [
{ name = "Kevin Atienza", email = "kevin.charles.atienza@gmail.com" }
]
dependencies = [
"natsort",
"colorama",
"termcolor",
"Jinja2",
"argcomplete",
"pytz",
"PyYAML",
]

[project.scripts]
kg = "kg:main"
kg-kg = "kg:main"
kg-kompgen = "kg:main"
kg-pg = "kg:main_pg"
kg-polygon = "kg:main_pg"
kg-hr = "kg:main_hr"
kg-hackerrank = "kg:main_hr"
kg-aux = "kg.script.auxilliary:main"

[tool.setuptools.packages.find]
include = [
"kg",
"kg.script",
"kg.diff",
"kg.black_magic",
"kg.graphs",
"kg.grids",
"kg.utils",
"kg.math",
]

[tool.setuptools.package-data]
kg = [
"data/*.*",
"data/template/*",
"data/template/kg/*",
"data/template/cms-it/*",
"data/template/dom/*",
"data/contest_template/*",
"data/contest_template/pc2/*",
"data/contest_template/cms-it/*",
"data/contest_template/dom/*",
]
"kg.diff" = [
"templates/*",
]
12 changes: 0 additions & 12 deletions setup.bat

This file was deleted.

57 changes: 0 additions & 57 deletions setup.py

This file was deleted.

34 changes: 0 additions & 34 deletions setup.sh

This file was deleted.