Skip to content
Closed
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
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,14 @@ uninstall:
develop-install: develop-uninstall
$(PIP) install --no-deps -e ./

# known issue: It will fail to uninstall scripts
# if they were installed in develop mode
develop-uninstall:
$(PIP) uninstall -y $(PACKAGE)

help: ## Show this help.
@grep '##' Makefile| sed -e '/@/d' | sed -r 's,(.*?:).*##(.*),\1\2,g'

dist: ## Build setuptools dist
python setup.py sdist bdist_wheel
python -m build

distupload: ## Upload package dist to PyPi
python -m twine upload --verbose dist/*
Expand Down
45 changes: 45 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[build-system]
requires = ["setuptools>=44"]
build-backend = "setuptools.build_meta"

[project]
name = "imaids"
authors = [{ name = "lnls-ima" } ]
maintainers = [
{name = "Gabriel Rezende de Ascenção", email = "gabriel.ascencao@lnls.br"},
{name = "Lucas Francisco"},
]
description = "Insertion Devices Package"
readme = "README.md"
dynamic = ["version", "dependencies"]
requires-python = ">=3.6"
classifiers = [
"Intended Audience :: Science/Research",
"Programming Language :: Python",
"Topic :: Scientific/Engineering",
]
keywords = ["SIRIUS", "python", "Accelerator Physics", "Insertion Devices"]

license = "MIT"
license-files= [ "LICENSE", ]

[project.urls]
Homepage = "https://github.com/lnls-ima/insertion-devices"
Download = "https://github.com/lnls-ima/insertion-devices"
Repository = "https://github.com/lnls-ima/insertion-devices.git"
Issues = "https://github.com/lnls-ima/insertion-devices/issues"

[project.optional-dependencies]
tests = ["nose"]

# --- Setuptools specific configurations ---
[tool.setuptools]
packages = ["imaids"]
include-package-data = true

[tool.setuptools.dynamic]
version = { file = "VERSION" }
dependencies = { file = "requirements.txt" }

[tool.setuptools.package-data]
imaids = ["VERSION", "presets/*"]
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
"""Setup module."""

import pathlib

from setuptools import setup
import pkg_resources


def get_abs_path(relative):
"""Get absolute path of file."""
return pkg_resources.resource_filename(__name__, relative)
"""."""
return str(pathlib.Path(__file__).parent / relative)


with open(get_abs_path("README.md"), "r") as _f:
Expand Down