Skip to content
Merged
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
27 changes: 17 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Python package

on: [push]
on:
push:
branches:
- master
pull_request: ~

jobs:
build:
Expand All @@ -9,19 +13,22 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: [3.6, 3.7]
python-version: [3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-ci.txt
- name: Test with pytest
run: |
pip install pytest
pytest -v -s
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pipenv
pipenv install --deploy
# Install manually to avoid all other dev deps, use --deploy
# to fail if the lockfile doesn't match
- name: Test with pytest
run: |
pipenv install pytest
pipenv run pytest -v
30 changes: 30 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Contributing

Here's how to run all the development stuff.

## Setup Development Environment
* `pyenv global 3.6.8-amd64`
* `pipenv install --dev`

## Building

Building is a little convoluted because we build a x64 and an x86 binary...

* `pyenv global 3.6.8-amd64`
* Originally wasn't able to get this to run on Python 3.7 when it was new, but 3.6 is guarenteed to build the `.exe`
* `pyenv exec python -m venv venv64`
* `venv64\scripts\activate.bat` or `venv64/scripts/activate` for Linux
* `pip install -r requirements-dev.txt` (Installs `pyinstaller` and `pytest`)
* `python build_exe.py`
* `venv64\scripts\deactivate.bat` (or you'll use the wrong python when you make another `venv`)
* Do the same with `pyenv and 3.6.8` and make a folder called `venv32` instead

## Testing
* `pipenv run pytest -v` in the root directory

## Releasing
Refer to [the python docs on packaging for clarification](https://packaging.python.org/tutorials/packaging-projects/).
* Make sure you've updated `setup.py`
* `python setup.py sdist bdist_wheel` - Create a source distribution and a binary wheel distribution into `dist/`
* `twine upload dist/unitypackage_extractor-x.x.x*` - Upload all `dist/` files to PyPI of a given version
* Make sure to tag the commit you released!
12 changes: 12 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
pytest = "*"
twine = "*"
setuptools = "*"
wheel = "*"
# Don't put pyinstaller in here bc it has trouble in CI
# PyInstaller = "*"
236 changes: 236 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 3 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@

# Unity Package Extractor


Extract your .unitypackage

## Usage without Python

* Download the [unitypackage_extractor.zip](https://github.com/Cobertos/unitypackage_extractor/releases/tag/0.5.1) from the Releases tab.
* Download the [unitypackage_extractor.zip](https://github.com/Cobertos/unitypackage_extractor/releases/latest) from the Releases tab.
* Extract everything into a new directory
* Drag and drop your `.unitypackage` onto `extractor.exe` OR
* Run from the command line with `extractor.exe [path/to/your/package.unitypackage] (optional/output/path)`
Expand All @@ -22,7 +21,7 @@ Extract your .unitypackage

* `pip install unitypackage_extractor`

* From the command line `python -m unitypackage_extractor.extractor [path/to/your/package.unitypackage] (optional/output/path)`
* From the command line `python -m unitypackage_extractor [path/to/your/package.unitypackage] (optional/output/path)`

* OR in your Python file:
```python
Expand All @@ -36,26 +35,4 @@ extractPackage("path/to/your/package.unitypackage", outputPath="optional/output/
The maintainers of thousands of packages (including me! :3) are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/pypi-unitypackage-extractor?utm_source=pypi-unitypackage-extractor&utm_medium=referral&utm_campaign=readme)

## Contributing
#### Building (requires pyenv)
* `pyenv global 3.6.8-amd64`
* Originally wasn't able to get this to run on Python 3.7 when it was new, but 3.6 is guarenteed to build the `.exe`
* `pyenv exec python -m venv venv64`
* `venv64\scripts\activate.bat` or `venv64/scripts/activate` for Linux
* `pip install -r requirements-dev.txt` (Installs `pyinstaller` and `pytest`)
* `python build_exe.py`
* `venv64\scripts\deactivate.bat` (or you'll use the wrong python when you make another `venv`)
* Do the same with `pyenv and 3.6.8` and make a folder called `venv32` instead

#### Testing
* `python -m venv venv`
* `venv\scripts\activate.bat` or `venv/scripts/activate` for Linux
* `pip install -r requirements-dev.txt` (Installs `pyinstaller` and `pytest`)
* `pytest -v -s` in the root directory

#### Releasing
Refer to [the python docs on packaging for clarification](https://packaging.python.org/tutorials/packaging-projects/).
Make sure you've updated `setup.py`, and have installed `twine`, `setuptools`, and `wheel`
`python3 setup.py sdist bdist_wheel` - Create a source distribution and a binary wheel distribution into `dist/`
`twine upload dist/unitypackage_extractor-x.x.x*` - Upload all `dist/` files to PyPI of a given version
Make sure to tag the commit you released
Make sure to update the README link tag too!
See [CONTRIBUTING.md](https://github.com/Cobertos/md2notion/blob/master/CONTRIBUTING.md)
16 changes: 0 additions & 16 deletions requirements-ci.txt

This file was deleted.

Loading