Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

669 modernize packaging #671

Merged
merged 10 commits into from May 8, 2023
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -29,6 +29,7 @@ notebooks/.ipynb_checkpoints/

flexmeasures/ui/static/documentation
documentation/img/screenshot_*
generic_asset_fm_user_ownership.sql
nhoening marked this conversation as resolved.
Show resolved Hide resolved

uml_diagram.png
db_schema.png
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -46,7 +46,7 @@ install-deps:
pip-sync requirements/app.txt

install-flexmeasures:
python setup.py develop
pip install -e

install-pip-tools:
pip3 install -q "pip-tools>=6.4"
Expand Down
1 change: 1 addition & 0 deletions documentation/changelog.rst
Expand Up @@ -16,6 +16,7 @@ Infrastructure / Support
----------------------

* The setting FLEXMEASURES_PLUGINS can be set as environment variable now (as a comma-separated list) [see `PR #660 <https://www.github.com/FlexMeasures/flexmeasures/pull/660>`_]
* Packaging was modernized to stop calling setup.py directly [see `PR #671 <https://www.github.com/FlexMeasures/flexmeasures/pull/671>`_]
* Remove API versions 1.0, 1.1, 1.2, 1.3 and 2.0, while allowing hosts to switch between ``HTTP status 410 (Gone)`` and ``HTTP status 404 (Not Found)`` responses [see `PR #667 <https://www.github.com/FlexMeasures/flexmeasures/pull/667>`_]

.. warning:: The setting `FLEXMEASURES_PLUGIN_PATHS` has been deprecated since v0.7. It has now been sunset. Please replace it with :ref:`plugin-config`.
Expand Down
Empty file.
Empty file.
6 changes: 5 additions & 1 deletion setup.py
Expand Up @@ -26,7 +26,11 @@ def load_requirements(use_case):
install_requires=load_requirements("app"),
setup_requires=["setuptools_scm"],
use_scm_version={"local_scheme": "no-local-version"}, # handled by setuptools_scm
packages=find_packages(), # will include *.py files and some other types
packages=find_packages()
+ [
"flexmeasures.ui.templates",
"flexmeasures.ui.static",
], # will include *.py files and some other types
nhoening marked this conversation as resolved.
Show resolved Hide resolved
include_package_data=True, # now setuptools_scm adds all files under source control
entry_points={
"console_scripts": [
Expand Down
3 changes: 1 addition & 2 deletions to_pypi.sh
Expand Up @@ -66,8 +66,7 @@ pip -q install twine
pip -q install wheel

echo "[TO_PYPI] Packaging ..."
python setup.py egg_info sdist
python setup.py egg_info bdist_wheel
python -m build

if [ "$1" == "--dry-run" ]; then
echo "[TO_PYPI] Not uploading to Pypi (--dry-run active) ..."
Expand Down