muspan 0.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- muspan-0.0.0/LICENSE +1 -0
- muspan-0.0.0/PKG-INFO +21 -0
- muspan-0.0.0/README.md +7 -0
- muspan-0.0.0/muspan/__init__.py +72 -0
- muspan-0.0.0/pyproject.toml +27 -0
muspan-0.0.0/LICENSE
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Please see the file "MuSpAn Academic use licence.pdf" for details of the software licence/license (also available at https://docs.muspan.co.uk/MuSpAn_Academic_use_licence.pdf).
|
muspan-0.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: muspan
|
|
3
|
+
Version: 0.0.0
|
|
4
|
+
Summary: A PyPI hosted importer for the Python package MuSpAn.
|
|
5
|
+
Project-URL: Homepage, https://www.muspan.co.uk
|
|
6
|
+
Project-URL: Documentation, https://docs.muspan.co.uk/latest/Documentation.html
|
|
7
|
+
Project-URL: Repository, https://github.com/joshwillmoore1/MuSpAn-PyPI
|
|
8
|
+
Author-email: Joshua Bull <joshua.bull@maths.ox.ac.uk>, Joshua Moore <joshua.moore@maths.ox.ac.uk>
|
|
9
|
+
Maintainer-email: Joshua Bull <joshua.bull@maths.ox.ac.uk>, Joshua Moore <joshua.moore@maths.ox.ac.uk>
|
|
10
|
+
License: Please see the file "MuSpAn Academic use licence.pdf" for details of the software licence/license (also available at https://docs.muspan.co.uk/MuSpAn_Academic_use_licence.pdf).
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Requires-Python: >=3.10
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
|
|
15
|
+
# MuSpAn-PyPI
|
|
16
|
+
|
|
17
|
+
This package is a PyPI hosted installer for the Python Package MuSpAn (www.muspan.co.uk).
|
|
18
|
+
|
|
19
|
+
Note that MuSpAn is not currently publicly available, and therefore cannot be installed directly through pip without credentials. It is available under an [Academic Use Licence](https://docs.muspan.co.uk/MuSpAn_Academic_use_licence.pdf) and academic/non-commercial verification is required to access the package. For more information, see https://docs.muspan.co.uk/latest/Installation.html#installing-muspan.
|
|
20
|
+
|
|
21
|
+
If you have attempted to install MuSpAn using this PyPI installer, it will attempt to ask for credentials to install MuSpAn from the official website. We recommend installing directly from [the MuSpAn website](https://docs.muspan.co.uk/latest/Installation) where possible, rather than using this installer.
|
muspan-0.0.0/README.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# MuSpAn-PyPI
|
|
2
|
+
|
|
3
|
+
This package is a PyPI hosted installer for the Python Package MuSpAn (www.muspan.co.uk).
|
|
4
|
+
|
|
5
|
+
Note that MuSpAn is not currently publicly available, and therefore cannot be installed directly through pip without credentials. It is available under an [Academic Use Licence](https://docs.muspan.co.uk/MuSpAn_Academic_use_licence.pdf) and academic/non-commercial verification is required to access the package. For more information, see https://docs.muspan.co.uk/latest/Installation.html#installing-muspan.
|
|
6
|
+
|
|
7
|
+
If you have attempted to install MuSpAn using this PyPI installer, it will attempt to ask for credentials to install MuSpAn from the official website. We recommend installing directly from [the MuSpAn website](https://docs.muspan.co.uk/latest/Installation) where possible, rather than using this installer.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import subprocess
|
|
2
|
+
import sys
|
|
3
|
+
from importlib.metadata import version
|
|
4
|
+
|
|
5
|
+
# the version of this installer package should always be less than 1.0.0
|
|
6
|
+
__version__ = version("muspan")
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
print("")
|
|
10
|
+
print("--------------- MuSpAn Information ---------------")
|
|
11
|
+
print("MuSpAn PyPI installation detected, this installation does not contain MuSpAn.")
|
|
12
|
+
print("MuSpAn package will now be installed from https://www.muspan.co.uk/")
|
|
13
|
+
print(" ")
|
|
14
|
+
print("If you need a username and password, complete the verification form: https://www.muspan.co.uk/get-the-code")
|
|
15
|
+
print("More information: https://docs.muspan.co.uk/latest/Installation.html")
|
|
16
|
+
print(" ")
|
|
17
|
+
print("Attempting installation...")
|
|
18
|
+
print(" ")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def install_hosted_package():
|
|
22
|
+
try:
|
|
23
|
+
from IPython import get_ipython
|
|
24
|
+
shell = get_ipython().__class__.__name__
|
|
25
|
+
if shell == 'ZMQInteractiveShell':
|
|
26
|
+
print("--------------- MuSpAn Information ---------------\nPackage called from a ZMQInteractiveShell enviroment (notebook).\n \nIn a new notebook cell, please run:\n\nmuspan.install_package_notebook(username,password)\n \nto install MuSpAn using your username and password access credentials provided by the MuSpAn team.")
|
|
27
|
+
else:
|
|
28
|
+
subprocess.check_call([
|
|
29
|
+
sys.executable, "-m", "pip", "install", "-U",
|
|
30
|
+
"https://docs.muspan.co.uk/code/latest.zip",
|
|
31
|
+
])
|
|
32
|
+
except NameError:
|
|
33
|
+
subprocess.check_call([
|
|
34
|
+
sys.executable, "-m", "pip", "install", "-U",
|
|
35
|
+
"https://docs.muspan.co.uk/code/latest.zip",
|
|
36
|
+
])
|
|
37
|
+
|
|
38
|
+
# this attempts to run the installer from
|
|
39
|
+
install_hosted_package()
|
|
40
|
+
|
|
41
|
+
def install_package_notebook(username=None,password=None):
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
Installs the latest version of the MuSpAn package using PIP from the host repository using the provided username and password following user verification.
|
|
45
|
+
|
|
46
|
+
Parameters
|
|
47
|
+
----------
|
|
48
|
+
username : str
|
|
49
|
+
Username provided by MuSpAn team for package access.
|
|
50
|
+
password : str
|
|
51
|
+
Password provided by MuSpAn team for package access.
|
|
52
|
+
|
|
53
|
+
"""
|
|
54
|
+
# check username and password are strings
|
|
55
|
+
|
|
56
|
+
if not isinstance(username,str):
|
|
57
|
+
raise ValueError(f'Username for MuSpAn install must be a string')
|
|
58
|
+
|
|
59
|
+
if not isinstance(password,str):
|
|
60
|
+
raise ValueError(f'Password for MuSpAn install must be a string')
|
|
61
|
+
|
|
62
|
+
try:
|
|
63
|
+
subprocess.check_call([
|
|
64
|
+
sys.executable, "-m", "pip", "install", "-U",
|
|
65
|
+
"https://"+username+":"+password+"@docs.muspan.co.uk/code/latest.zip",
|
|
66
|
+
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
print('\n--------------- MuSpAn Information ---------------\nPlease restart the kernel to use MuSpAn following notebook installation')
|
|
70
|
+
|
|
71
|
+
except NameError:
|
|
72
|
+
print('The installation of MuSpAn using pip has failed.\nPlease see https://docs.muspan.co.uk/latest/Installation.html for installation information.')
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "muspan"
|
|
7
|
+
version = "0.0.0"
|
|
8
|
+
description = "A PyPI hosted importer for the Python package MuSpAn."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Joshua Bull", email = "joshua.bull@maths.ox.ac.uk" },
|
|
14
|
+
{ name = "Joshua Moore", email = "joshua.moore@maths.ox.ac.uk" }
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
maintainers = [
|
|
18
|
+
{ name = "Joshua Bull", email = "joshua.bull@maths.ox.ac.uk" },
|
|
19
|
+
{ name = "Joshua Moore", email = "joshua.moore@maths.ox.ac.uk" }
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
license = { file = "LICENSE" }
|
|
23
|
+
|
|
24
|
+
[project.urls]
|
|
25
|
+
Homepage = "https://www.muspan.co.uk"
|
|
26
|
+
Documentation = "https://docs.muspan.co.uk/latest/Documentation.html"
|
|
27
|
+
Repository = "https://github.com/joshwillmoore1/MuSpAn-PyPI"
|