Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
mkjt2 committed May 7, 2019
0 parents commit 2262047
Show file tree
Hide file tree
Showing 20 changed files with 716 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
version: 2
jobs:
unit_test:
docker:
- image: circleci/python:3.5.4
steps:
- checkout
- run: sudo pip install -r requirements.txt
- run: sudo pip install -r .circleci/test_requirements.txt
- run: git config --global user.email "test@test.invalid"
- run: git config --global user.name "Tester Tester"
- run: py.test --cov=lzdeb test/
- run: pylint -E lzdeb test
- run: pycodestyle lzdeb test
- run: mypy lzdeb test
package:
docker:
- image: circleci/python:3.5.4
steps:
- checkout
- run: sudo pip install -r requirements.txt
- run: python3 setup.py sdist bdist_wheel
functional_test:
docker:
- image: circleci/python:3.5.4
steps:
- checkout
- run: sudo pip install -r requirements.txt
- setup_remote_docker
- run: PYTHONPATH=$(pwd) scripts/lzdeb build --verbose examples/ripgrep
workflows:
version: 2
test_all:
jobs:
- functional_test
- unit_test
- package
5 changes: 5 additions & 0 deletions .circleci/test_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mypy
pycodestyle
pylint
pytest
pytest-cov
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.idea/
venv/
**/*.pyc
.mypy_cache/
.coveraga/e
dist/
build/
*.egg-info
6 changes: 6 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[MESSAGES CONTROL]
disable=fixme,
invalid-name,
logging-not-lazy,
missing-docstring,
too-few-public-methods
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Jackie Tung

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.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# LZDeb - build debian packages the lazy way


### Installation

1. Install Python 3
1. Install Docker
1. Install the pip package:
```bash
$ pip3 install lzdeb
```

Tested on MacOS. Probably works on Linux as well.

### Usage

Prepare a directory `/d` containing:
1. `/d/config.yml`
1. `/d/install`

Run:
```bash
$ lzdeb build /d
```

Collect the resulting debian package file in your working directory.

See `examples/` for details.

```bash
$ lzdeb build examples/ripgrep
...
$ ls *.deb
ripgrep_11.0.1-1_amd64.deb
```

### Contributions are welcome

This is a brand new project - the following areas need some love:

* Test coverage (unit / functional).
* Check the TODOs.
* Verify that this works on Linux
* Improve this README
7 changes: 7 additions & 0 deletions examples/ripgrep/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -e

cd ripgrep*/
cargo build --release
./target/release/rg --version
8 changes: 8 additions & 0 deletions examples/ripgrep/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

set -e

cd ripgrep*/
# cargo install does lots more than just copying the binary to the right place
# so let's just do it manually.
cp ./target/release/rg /usr/local/bin/rg
16 changes: 16 additions & 0 deletions examples/ripgrep/lzdeb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
builder:
image: rust:latest
source:
type: git
url: https://github.com/BurntSushi/ripgrep.git
ref: 11.0.1
pull_submodules: yes
deb_info:
pkgname: ripgrep
pkgversion: 11.0.1
pkgrelease: 1
pkglicense: MIT
pkggroup: main
maintainer: example@lzdeb.invalid
description: ripgrep recursively searches directories for a regex pattern

3 changes: 3 additions & 0 deletions lzdeb/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .lzdeb import *

__version__ = "0.1.2"
Loading

0 comments on commit 2262047

Please sign in to comment.