Skip to content

Commit

Permalink
Merge pull request #80 from melexis/clean-distributions
Browse files Browse the repository at this point in the history
Exclude unneeded files from package
  • Loading branch information
Letme authored Sep 9, 2024
2 parents d3b8ed3 + cb1e75b commit 939ff87
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 38 deletions.
34 changes: 12 additions & 22 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,17 @@ include README.rst
# added by check_manifest.py
include LICENSE
include NOTICE
include tox.ini
recursive-include mlx/coverity *.py
exclude mlx/coverity/__coverity_version__.py
recursive-include example *.bat
recursive-include example *.py
recursive-include example *.rst
recursive-include example Makefile
recursive-include tests *.py
recursive-include tests *.rst
recursive-include tests *.txt
recursive-include tests *.json

exclude example/.env.example
exclude tox.ini
exclude .pylintrc
recursive-exclude example _build *

# added by check_manifest.py
recursive-include example *.css
exclude .gitignore
exclude .codeclimate.yml
exclude codecov.yml
exclude warnings_config.yml

# added by check_manifest.py
recursive-include tests *.xml

# added by check-manifest
include *.json
recursive-include mlx/coverity *.py
exclude mlx/coverity/__coverity_version__.py
recursive-exclude .github *
recursive-exclude build *
recursive-exclude example *
recursive-exclude tests *
global-exclude *.py[co]
28 changes: 18 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ Example of custom credentials for the plugin:
coverity_credentials = {
'hostname': 'scan.coverity.com',
'username': 'reporter',
'password': 'coverity',
'username': 'myusername',
'password': 'mypassword',
'stream': 'some_coverity_stream',
}
Expand Down Expand Up @@ -287,7 +287,10 @@ nice gesture and considered as contribution, even if you do not have development
Development setup
-----------------

To run tests and checks we use tox.
To contribute to the code or documentation, you may want to run tests and build the documentation. Firstly, clone
the repository.

To run tests and checks we use tox_.

.. code-block:: bash
Expand All @@ -297,18 +300,23 @@ To run tests and checks we use tox.
# to run tests
tox
To build example locally you will need to install some dependencies and set your environment.
To build the example documentation locally, you will need to install the package and set your environment, see help_.

.. code-block:: bash
# install current package locally and its dependencies
pip3 install -e .
pip3 install --editable .
# copy example .env to your .env
cp example/.env.example .env
# define environment variables, needed by example/conf.py
# or store them in a .env file for a more permanent solution
export COVERITY_USERNAME='yourusername'
export COVERITY_PASSWORD='yourpassword'
export COVERITY_STREAM='yourstream'
export COVERITY_SNAPSHOT=''
# add env variables, adjust the values in .env
# build
make -C example/ html
# build documentation with Sphinx in a Tox environment
tox -e html
.. _`Traceability extension`: https://github.com/melexis/sphinx-traceability-extension/
.. _tox: https://tox.wiki/
.. _help: https://pypi.org/project/python-decouple/#where-is-the-settings-data-stored
4 changes: 0 additions & 4 deletions example/.env.example

This file was deleted.

4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
'Topic :: Utilities',
],
platforms="any",
packages=find_namespace_packages(where="."),
packages=find_namespace_packages(where=".", exclude=("example.*", "example", "tests.*", "tests", "build*")),
package_dir={"": "."},
include_package_data=True,
include_package_data=False,
install_requires=requires,
python_requires='>=3.8',
namespace_packages=['mlx'],
Expand Down

0 comments on commit 939ff87

Please sign in to comment.