Skip to content

Commit

Permalink
Switch to pyproject.toml; bump version to 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
will2dye4 committed Sep 15, 2023
1 parent 81b79fe commit e0c0031
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 50 deletions.
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright 2023 William Dye

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
5 changes: 0 additions & 5 deletions Makefile

This file was deleted.

34 changes: 12 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,23 @@ using a variety of different algorithms.

## Installation

The package is not currently available on PyPI or any other Python package repository. The easiest
way to install it is to clone the GitHub repository and install it from source.
The easiest way to install the package is to download it from [PyPI](https://pypi.org) using `pip`.
Note that `sudoku` depends on [Python](https://www.python.org/downloads/) 3.7 or newer; please
ensure that you have a semi-recent version of Python installed before proceeding.

### Prerequisites

* [Python 3.7](https://www.python.org/downloads/release/python-370/)
* [Git](https://git-scm.com)
* [Make](https://www.gnu.org/software/make/)
* [virtualenvwrapper](https://virtualenvwrapper.readthedocs.io/en/latest/)

### Installation Instructions

Run the following commands in a shell (a UNIX-like environment is assumed):
Run the following command in a shell (a UNIX-like environment is assumed):

```
$ git clone [email protected]:will2dye4/sudoku.git
$ cd sudoku
$ mkvirtualenv -p`which python3.7` sudoku
(sudoku) $ make install
$ pip install sudoku
```

It is not strictly necessary to create a virtual environment for the sudoku package. However, the
package makes use of Python 3.7 features, so if you choose not to use a virtual environment, you
assume responsibility for installing the package in an appropriate Python 3.7 environment.
The package does not have any dependencies besides Python itself. If you wish to sandbox your
installation inside a virtual environment, you may choose to use
[virtualenvwrapper](https://virtualenvwrapper.readthedocs.io/en/latest/) or a similar
utility to do so.

When successfully installed, a program called `sudoku` will be placed on your `PATH`. See the Usage
section below for details about how to use this program.
When successfully installed, a program called `sudoku` will be placed on your `PATH`. See the
Usage section below for details about how to use this program.

## Usage

Expand Down Expand Up @@ -275,4 +265,4 @@ this reason, **GUI mode is not available when using the DLX algorithm**.

A sample of the program running in GUI mode is shown below.

![GUI Mode](./images/gui_mode.png)
![GUI Mode](https://raw.githubusercontent.com/will2dye4/sudoku/master/images/gui_mode.png)
31 changes: 31 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[build-system]
requires = ['setuptools']
build-backend = 'setuptools.build_meta'

[project]
name = 'sudoku'
version = '1.0.1'
description = 'Solve sudoku puzzles using various algorithms'
license = {file = 'LICENSE'}
readme = 'README.md'
authors = [
{name = 'William Dye'},
]
keywords = ['dancing links', 'dlx', 'sudoku', 'sudoku solver']
requires-python = '>=3.7'

[project.optional-dependencies]
test = [
'pytest ~= 3.7.2',
]

[project.scripts]
ku = 'sudoku.__main__:ku'
sudoku = 'sudoku.__main__:main'

[project.urls]
Repository = 'https://github.com/will2dye4/sudoku.git'

[tool.setuptools.packages.find]
include = ['sudoku*']
namespaces = false
22 changes: 0 additions & 22 deletions setup.py

This file was deleted.

1 change: 0 additions & 1 deletion test_requirements.txt

This file was deleted.

0 comments on commit e0c0031

Please sign in to comment.