Skip to content

Commit

Permalink
Streamline development environment setup.
Browse files Browse the repository at this point in the history
- Move test requirements into setup.py.
- Add shell.nix.
  • Loading branch information
ryneeverett committed Aug 4, 2020
1 parent d68c886 commit 2e64985
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 3 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ Running Tests
-------------

```sh
cd /path/to/mkcodes
python setup.py develop
pip install -r test-requirements.txt
./test
```
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
setuptools.setup(
name='mkcodes',
install_requires=['click'],
tests_require=['markdown'],
extras_require={'markdown': ['markdown']},
py_modules=['mkcodes'],
entry_points={'console_scripts': ['mkcodes=mkcodes:main']}
Expand Down
25 changes: 25 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
let
pkgs = import <nixpkgs> {};
testDependencies = [
pkgs.python3Packages.setuptools
pkgs.python3Packages.markdown
];
mkcodes = pkgs.python3Packages.buildPythonPackage {
pname = "mkcodes";
version = "master";
src = ./.;

propagatedBuildInputs = [
pkgs.python3Packages.click
];
checkInputs = testDependencies;

# FIXME
doCheck = false;
};
in
pkgs.mkShell {
buildInputs = [
mkcodes
] ++ testDependencies;
}
1 change: 0 additions & 1 deletion test-requirements.txt

This file was deleted.

Empty file added tests/__init__.py
Empty file.

0 comments on commit 2e64985

Please sign in to comment.